fix(opencode): gate thinking/reasoning provider options on model capabilities - #34324
fix(opencode): gate thinking/reasoning provider options on model capabilities#34324MADEVAL wants to merge 1 commit into
Conversation
|
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. |
|
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:
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. |
Issue for this PR
Closes #34323
Type of change
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