Skip to content

Thinking/reasoning provider options not gated by model capabilities #34323

Closed as not planned

Description

@MADEVAL

Description

Thinking/reasoning provider options in ProviderTransform.options() are not gated by model.capabilities.reasoning. This breaks non-reasoning models in two ways:

  1. Normal output from a non-thinking model gets stored as reasoning ("thinking") instead of assistant text.
  2. Opting out via agent options: { thinking: { type: "disable" } } passes the field straight through to the provider, and the non-thinking model's API rejects the unknown parameter.

Seven branches in options() inject thinking/reasoning params based on provider ID or model ID matching alone. Only Google and alibaba-cn branches already gate on capabilities.reasoning.

Plugins

None

OpenCode version

1.17.11

Steps to reproduce

  1. Configure a subagent using a non-reasoning model whose ID/provider matches one of the ungated branches (e.g. zai/zhipuai via openai-compatible)
  2. Invoke it via the task tool — output is recorded as thinking instead of text
  3. Add options: { thinking: { type: "disable" } } — provider rejects the request

Operating System

All

Terminal

All

Activity

  1. github-actions commented on Jun 28, 2026

    @github-actions
    Contributor

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

  2. github-actions commented on Aug 28, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions