[PR #6839] fix: prevent main model thinking variant from applying to small model #12136

Closed
opened 2026-02-16 18:17:04 -05:00 by yindo · 0 comments
Owner

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

State: closed
Merged: Yes


Summary

When changing thinking level (ctrl+t) for the main model, the selected variant (e.g., reasoningEffort) was incorrectly applied to small model calls (title/summary generation). This caused API errors when the small model didn't support the parameter.

Problem

small=true agent=title params={"options":{"reasoningEffort":"low"}}
ERROR "Model grok-code does not support parameter reasoningEffort."

The variant from input.user.variant was applied regardless of whether small: true was set.

Fix

Skip variant application when small: true in llm.ts:

// Before
const variant = input.model.variants && input.user.variant ? input.model.variants[input.user.variant] : {}
// After
const variant = !input.small && input.model.variants && input.user.variant ? input.model.variants[input.user.variant] : {}
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6839 **State:** closed **Merged:** Yes --- **Summary** When changing thinking level (ctrl+t) for the main model, the selected variant (e.g., reasoningEffort) was incorrectly applied to small model calls (title/summary generation). This caused API errors when the small model didn't support the parameter. **Problem** ``` small=true agent=title params={"options":{"reasoningEffort":"low"}} ERROR "Model grok-code does not support parameter reasoningEffort." ``` The variant from `input.user.variant` was applied regardless of whether `small: true` was set. **Fix** Skip variant application when `small: true` in `llm.ts`: ```ts // Before const variant = input.model.variants && input.user.variant ? input.model.variants[input.user.variant] : {} // After const variant = !input.small && input.model.variants && input.user.variant ? input.model.variants[input.user.variant] : {} ```
yindo added the pull-request label 2026-02-16 18:17:04 -05:00
yindo closed this issue 2026-02-16 18:17:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12136