Skip to content

fix(opencode): gate thinking/reasoning provider options on model capabilities - #34324

Closed
MADEVAL wants to merge 1 commit into
anomalyco:devfrom
CyberSecureAgency:gate-reasoning-options
Closed

fix(opencode): gate thinking/reasoning provider options on model capabilities#34324
MADEVAL wants to merge 1 commit into
anomalyco:devfrom
CyberSecureAgency:gate-reasoning-options

Conversation

@MADEVAL

@MADEVAL MADEVAL commented Jun 28, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #34323

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Seven branches in ProviderTransform.options() injected thinking/reasoning params based solely on provider ID or model ID matching, ignoring model.capabilities.reasoning. Only Google and alibaba-cn already gated correctly.

This gates every remaining branch on capabilities.reasoning following the established pattern. For the gpt-5 family block reasoningEffort, reasoningSummary, and include are gated while textVerbosity and promptCacheKey are left ungated since they are not reasoning-specific.

How did you verify your code works?

All existing tests set capabilities.reasoning: true on their model fixtures and remain unchanged. Added three tests that create non-reasoning models and verify thinking/reasoning params are absent: zai/zhipuai skips thinking, minimax-m3 skips thinking, gpt-5 skips reasoningEffort/reasoningSummary/include but keeps textVerbosity.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search results, I found one potentially related PR:

PR #31570: feat: drive reasoning variants from models.dev reasoning_options

This PR appears related because it also deals with reasoning options and how they're managed from model configuration. However, it seems to approach the problem differently (driving reasoning variants from models.dev) whereas PR #34324 gates the options based on model capabilities. These could be complementary changes addressing different aspects of reasoning configuration.

No other open PRs directly duplicate the scope of PR #34324, which specifically gates thinking/reasoning provider options on model capabilities in ProviderTransform.

@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Thinking/reasoning provider options not gated by model capabilities

1 participant