fix(azure): coerce empty azureApiKey to undefined for env var fallback

This commit is contained in:
Roo Code 2026-02-07 01:15:37 +00:00 committed by Hannes Rudolph
parent f66fbff12f
commit b331a1405e

View file

@ -42,7 +42,7 @@ export class AzureHandler extends BaseProvider implements SingleCompletionHandle
// /deployments/{id}/{path} URL shape.
this.provider = createAzure({
baseURL: options.azureBaseUrl || undefined,
apiKey: options.azureApiKey, // Optional — Azure supports managed identity / Entra ID auth
apiKey: options.azureApiKey || undefined, // Optional — Azure supports managed identity / Entra ID auth
apiVersion: options.azureApiVersion ?? azureOpenAiDefaultApiVersion,
useDeploymentBasedUrls: true,
headers: DEFAULT_HEADERS,