You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Azure provider: reasoningEffort model option silently ignored #20275
When using @ai-sdk/azure as a custom provider with model-level options like reasoningEffort, the option is silently dropped — reasoning_effort never appears in the outgoing HTTP request body.
Steps to reproduce
Configure a custom Azure OpenAI provider with a model that sets reasoningEffort:
In packages/opencode/src/provider/transform.ts, sdkKey("@ai-sdk/azure") returns "azure", so model options are wrapped as providerOptions["azure"].
However, @ai-sdk/azure delegates to OpenAIChatLanguageModel from @ai-sdk/openai, which hardcodes provider: 'openai' in parseProviderOptions — meaning it only reads from providerOptions["openai"].
The options end up under the wrong key and are silently ignored.
Expected behavior
reasoning_effort (and other model options) should be included in the request body when configured on an Azure provider model.
changed the title [-]Azure provider: reasoningEffort model option silently ignored since v1.3.4[/-][+]Azure provider: reasoningEffort model option silently ignored[/+]on Mar 31, 2026
I checked commit 4dd866d and it addresses a different issue — it removes the @ai-sdk/azure exclusion from the message-levelproviderOptions remapping (line ~295 in transform.ts). That fix ensures message/part-level options get remapped from a custom provider name to the SDK key.
However, the reasoningEffort bug is in sdkKey() itself (line 29), which controls the model-levelproviderOptions key — the one used when passing options like reasoningEffort to streamText(). sdkKey("@ai-sdk/azure") still returns "azure", but OpenAIChatLanguageModel from @ai-sdk/openai hardcodes provider: 'openai' in parseProviderOptions, so it only reads from providerOptions["openai"].
I verified on the latest dev branch (with that commit included) that reasoning_effort is still missing from the outgoing request body when using an Azure provider with "options": { "reasoningEffort": "medium" }.
The fix in #20272 (changing sdkKey to return "openai" for @ai-sdk/azure) is still needed.
Activity
github-actions commentedon Mar 31, 2026
This issue might be a duplicate of existing issues. Please check:
[-]Azure provider: reasoningEffort model option silently ignored since v1.3.4[/-][+]Azure provider: reasoningEffort model option silently ignored[/+]fix: use openai key for Azure provider options
rekram1-node commentedon Mar 31, 2026
this may have fixed it:
4dd866d
meruiden commentedon Apr 1, 2026
Thanks for looking into this @rekram1-node!
I checked commit 4dd866d and it addresses a different issue — it removes the
@ai-sdk/azureexclusion from the message-levelproviderOptionsremapping (line ~295 intransform.ts). That fix ensures message/part-level options get remapped from a custom provider name to the SDK key.However, the
reasoningEffortbug is insdkKey()itself (line 29), which controls the model-levelproviderOptionskey — the one used when passing options likereasoningEfforttostreamText().sdkKey("@ai-sdk/azure")still returns"azure", butOpenAIChatLanguageModelfrom@ai-sdk/openaihardcodesprovider: 'openai'inparseProviderOptions, so it only reads fromproviderOptions["openai"].I verified on the latest
devbranch (with that commit included) thatreasoning_effortis still missing from the outgoing request body when using an Azure provider with"options": { "reasoningEffort": "medium" }.The fix in #20272 (changing
sdkKeyto return"openai"for@ai-sdk/azure) is still needed.