Skip to content

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

Description

@bkocis

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions