Elffuss BraidHub

kikocis/continue public

fix: pathname generation
Changeset9e5ceba2cbc77ae452432d8594ce42b6047cc890e758e822c7d181342bcb67db
AuthorTomasz Stefaniak <tomasz.p.stefaniak@gmail.com> · 2025-06-25 15:43 -07:00
CommitterTomasz Stefaniak <tomasz.p.stefaniak@gmail.com> · 2025-06-25 15:43 -07:00
Parents607dd12e068c

Browse the files at this changeset

1 file changed

modified packages/openai-adapters/src/apis/Azure.ts +5 −1
@@ -63,7 +63,11 @@
6363 "`env.apiVersion` is a required configuration property for Azure OpenAI",
6464 );
6565 }
66- url.pathname = `${url.pathname}/openai/deployments/${config.env.deployment}`;
66+
67+ const basePathname = `openai/deployments/${config.env.deployment}`;
68+
69+ url.pathname =
70+ url.pathname === "/" ? basePathname : `${url.pathname}/${basePathname}`;
6771
6872 queryParams["api-version"] = config.env.apiVersion;
6973 }