[PR #12117] fix(provider): respect thinking toggle for Gemini models #14071

Open
opened 2026-02-16 18:18:53 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12117

State: open
Merged: No


What does this PR do?

The Gemini thinking toggle was busted. In transform.ts, the options() function always sent thinkingConfig: { includeThoughts: true } for Google/Vertex models - hardcoded, regardless of toggle state.

So turning thinking OFF did nothing. The API always got includeThoughts: true.

Fix: deleted the unconditional default. Now thinking config only gets set when you pick a variant (i.e., toggle it on). Same issue existed for Gemini 3 on OpenRouter with reasoning.effort: "high" - removed that too.

How did you verify your code works?

options() returns base provider options
variants() returns thinking configs for each effort level
When toggle is ON → variant merges in → thinking enabled
When toggle is OFF → no variant → now nothing sets thinking (before: options() still did)

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12117 **State:** open **Merged:** No --- ### What does this PR do? The Gemini thinking toggle was busted. In transform.ts, the options() function always sent thinkingConfig: { includeThoughts: true } for Google/Vertex models - hardcoded, regardless of toggle state. So turning thinking OFF did nothing. The API always got includeThoughts: true. Fix: deleted the unconditional default. Now thinking config only gets set when you pick a variant (i.e., toggle it on). Same issue existed for Gemini 3 on OpenRouter with reasoning.effort: "high" - removed that too. ### How did you verify your code works? options() returns base provider options variants() returns thinking configs for each effort level When toggle is ON → variant merges in → thinking enabled When toggle is OFF → no variant → now nothing sets thinking (before: options() still did)
yindo added the pull-request label 2026-02-16 18:18:53 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14071