-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Azure models fail due to reasoning_effort being sent even with --variant none #12113
Description
When using OpenCode with Azure OpenAI models, OpenCode appears to always include the reasoning_effort request argument, even when reasoning is explicitly disabled via --variant none.
Azure rejects this parameter for certain deployments with a hard error:
Error: Unrecognized request argument supplied: reasoning_effort
This makes it impossible to use some Azure models with OpenCode at the moment.
When I use gpt-4 based models this issue does not appear!
Environment
OpenCode version: 1.1.20
OS: Mac 26.2 (25C56)
Provider: azure-apim
Model: gpt-5
Azure OpenAI via APIM
Azure region: EU
Steps to reproduce
opencode run
-m "azure-apim/gpt-5"
--variant none
"Hello"
Returns:
Error: Unrecognized request argument supplied: reasoning_effort
Expected Behavior
When using --variant none, OpenCode should omit the reasoning_effort parameter entirely from the request.
Azure requires unsupported parameters to be omitted, not set to "none".
Also, how to indeed use the reasoning models gpt-5 on Azure with Opencode?