fix: pass both 'openai' and 'azure' providerOptions keys for @ai-sdk/azure (#20272)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
pull/21147/head
Corné Steenhuis 2026-04-06 04:34:53 +02:00 committed by GitHub
parent f0f1e51c5c
commit 9965d385de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -936,6 +936,12 @@ export namespace ProviderTransform {
}
const key = sdkKey(model.api.npm) ?? model.providerID
// @ai-sdk/azure delegates to OpenAIChatLanguageModel which reads from
// providerOptions["openai"], but OpenAIResponsesLanguageModel checks
// "azure" first. Pass both so model options work on either code path.
if (model.api.npm === "@ai-sdk/azure") {
return { openai: options, azure: options }
}
return { [key]: options }
}