Skip to content

Commit 9965d38

Browse files
meruidenclauderekram1-node
authored
fix: pass both 'openai' and 'azure' providerOptions keys for @ai-sdk/azure (anomalyco#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>
1 parent f0f1e51 commit 9965d38

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

packages/opencode/src/provider/transform.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,12 @@ export namespace ProviderTransform {
936936
}
937937

938938
const key = sdkKey(model.api.npm) ?? model.providerID
939+
// @ai-sdk/azure delegates to OpenAIChatLanguageModel which reads from
940+
// providerOptions["openai"], but OpenAIResponsesLanguageModel checks
941+
// "azure" first. Pass both so model options work on either code path.
942+
if (model.api.npm === "@ai-sdk/azure") {
943+
return { openai: options, azure: options }
944+
}
939945
return { [key]: options }
940946
}
941947

0 commit comments

Comments
 (0)