Azure models fail due to reasoning_effort being sent even with --variant none #8509

Open
opened 2026-02-16 18:10:09 -05:00 by yindo · 1 comment
Owner

Originally created by @bkocis on GitHub (Feb 4, 2026).

Originally assigned to: @rekram1-node on GitHub.

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?

Originally created by @bkocis on GitHub (Feb 4, 2026). Originally assigned to: @rekram1-node on GitHub. 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?
yindo added the bug label 2026-02-16 18:10:09 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 4, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #1823: Reasoning effort from opencode.json not passed through for Azure models - related Azure reasoning_effort configuration issue
  • #53: using groq DeepseekR1DistillLlama70b failes with: reasoning_effort is unsupported - similar reasoning_effort parameter rejection
  • #7180: Azure OpenAI need to change completions -> responses - other Azure API compatibility issues

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Feb 4, 2026): This issue might be a duplicate of existing issues. Please check: - #1823: Reasoning effort from opencode.json not passed through for Azure models - related Azure reasoning_effort configuration issue - #53: using groq DeepseekR1DistillLlama70b failes with: reasoning_effort is unsupported - similar reasoning_effort parameter rejection - #7180: Azure OpenAI need to change completions -> responses - other Azure API compatibility issues Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8509