From 537d6b57216a5ef4b31ba6845287a491430af814 Mon Sep 17 00:00:00 2001 From: tony wu Date: Mon, 27 Oct 2025 16:13:20 +0800 Subject: [PATCH] fixed issue 1684 to remove "/deployments/${model}" in the path if it use azure openai v1 api --- src/azure.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure.ts b/src/azure.ts index 97765df6d..a3d1cb26f 100644 --- a/src/azure.ts +++ b/src/azure.ts @@ -130,7 +130,7 @@ export class AzureOpenAI extends OpenAI { throw new Error('Expected request body to be an object'); } const model = this.deploymentName || options.body['model'] || options.__metadata?.['model']; - if (model !== undefined && !this.baseURL.includes('/deployments')) { + if (model !== undefined && !this.baseURL.includes('/deployments') && !this.baseURL.includes('/v1')) { options.path = `/deployments/${model}${options.path}`; } }