feat(core): enable low/med/high variants for Claude Sonnet/Opus 4.6 thinking - #14
Conversation
…hinking Replace disabled variants with thinkingConfig budgets (8192/16384/32768) matching THINKING_TIER_BUDGETS.claude. Allows OpenCode variant picker and --variant flag to control Claude thinking effort via providerOptions.google.thinkingConfig.thinkingBudget. Fixes effort configurability; gemini variants already supported.
ualtinok
left a comment
There was a problem hiding this comment.
Changes requested
This should not enable low / medium / high as supported Claude effort tiers without further evidence.
I revalidated both Claude routes against native AGY CLI 1.1.24 and the live endpoint:
agy --model claude-sonnet-4-6 --effort low|medium|highrejects every selection with--effort is not supported for model "claude-sonnet-4-6".- Native Sonnet and Opus MITM captures both send
thinkingConfig: { includeThoughts: true, thinkingBudget: 1024 }withmaxOutputTokens: 64000. - Replaying the captured Sonnet request with 8192, 16384, and 32768 returns HTTP 200, but that establishes only that the backend tolerates those values. It does not establish low/medium/high effort semantics, and controlled responses did not show a monotonic budget-to-effort relationship.
The current disabled variants are therefore deliberate native-parity behavior. This patch would advertise unsupported effort controls and send up to 32x the native budget.
The verification also does not cover the production seam. request.ts independently uses extractVariantThinkingConfig; it does not call the cited resolveModelWithVariant. Please add request-level tests proving the final Antigravity payload for every proposed preset. The Antigravity wire field is camel-case thinkingBudget, not the snake-case thinking_budget shown in the PR description.
Required direction: either keep these variants disabled, or redesign this explicitly as a non-native/experimental custom-budget feature with validated semantics, accurate UI wording, final-wire tests, and user-facing documentation.
Summary
Enables
low/medium/highvariants for bothantigravity-claude-sonnet-4-6-thinkingandantigravity-claude-opus-4-6-thinkingwiththinkingConfig.thinkingBudget8192/16384/32768 matchingTHINKING_TIER_BUDGETS.claude.Previously these models advertised
{disabled:true}variants, so OpenCode's variant picker showed no options and--variantwas ignored. Gemini flash/pro already had workingthinkingLevelvariants; Claude now matches.Changes
packages/core/src/model-registry.ts: replace disabled variants with budgets (NET +4 lines, functionally NET 0 replacement)packages/opencode/src/plugin/config/models.test.ts: update expectationVerification
./node_modules/.bin/tsc -p packages/core/tsconfig.build.jsonpassesbun test --isolate packages/core/src/model-registry.test.ts7 passbun test --isolate packages/opencode/src/plugin/config/models.test.ts4 passproviderOptions.google.thinkingConfig.thinkingBudget+generationConfigfallback (packages/core/src/transform/model-resolver.ts:resolveModelWithVariant)Tested via
Closes configurability request for Claude Sonnet effort. Net LOC: +4/-4 effectively 0 (swap disabled for budgets).
Summary by cubic
Enables low/medium/high thinking variants for Claude Sonnet/Opus 4.6 so the variant picker and
--variantflag now control thinking effort. Previously these models advertised disabled variants, so no options showed and the flag was ignored.Changes
packages/core/src/model-registry.ts.packages/opencode/src/plugin/config/models.test.ts.thinkingConfig.thinkingBudgeton Antigravity requests.Written for commit 8319a59. Summary will update on new commits.