#20123: Add Claude Sonnet 4.6 to OpenCode Zen model catalog
agents
size: XS
trusted-contributor
Cluster:
OpenAI Model Fixes and Updates
## Problem
`claude-sonnet-4-6` is missing from the OpenCode Zen static model data tables. When the model is resolved (e.g. via alias), it falls back to default values — zero costs, 128k context window, 8k max tokens — all incorrect.
## Fix
Add `claude-sonnet-4-6` to:
- `MODEL_COSTS`: $1.50/$7.50 per million tokens (input/output)
- `MODEL_CONTEXT_WINDOWS`: 200k
- `MODEL_MAX_TOKENS`: 64k
- `MODEL_NAMES`: "Claude Sonnet 4.6"
- `getOpencodeZenStaticFallbackModels()`: included in static fallback list
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Adds `claude-sonnet-4-6` to all five OpenCode Zen static model data tables (costs, context window, max tokens, display name, and fallback list). The cost ratios (cacheRead at 10% of input, cacheWrite at 125% of input) are consistent with the existing Claude model entries, and the 200k context window / 64k max tokens match `claude-opus-4-5`.
- The existing test in `opencode-zen-models.e2e.test.ts` hardcodes `expect(models.length).toBe(10)` and will fail since the fallback list now contains 11 models.
<h3>Confidence Score: 3/5</h3>
- The data changes are correct, but the PR will break an existing test.
- The model data entries are consistent with existing patterns and the PR description is accurate. However, the test in `opencode-zen-models.e2e.test.ts` hardcodes `models.length` as 10 and will fail since the fallback list now has 11 models. This needs to be fixed before merging.
- `src/agents/opencode-zen-models.e2e.test.ts` needs its model count assertion updated from 10 to 11.
<sub>Last reviewed commit: 9818622</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#20122: Fix sonnet alias resolving to opus in OpenCode Zen model aliases
by Clawborn · 2026-02-18
80.3%
#23250: feat: add Sonnet 4.6 forward compat for google-antigravity
by Oceanswave · 2026-02-22
75.0%
#17015: fix: correct Claude 4.5 context limits in model registry
by Limitless2023 · 2026-02-15
73.2%
#10831: fix(agents): set Opus 4.6 context window to 1M in forward-compat fa...
by slawt · 2026-02-07
72.4%
#19927: fix(agents): replace hardcoded Anthropic model IDs with pattern mat...
by Milofax · 2026-02-18
71.9%
#12220: fix: forward-compat models now respect user-configured contextWindow
by Batuhan4 · 2026-02-09
71.6%
#19533: fix: allow forward-compat models in buildAllowedModelSet
by Anthony-g-dev · 2026-02-17
71.2%
#6053: fix: use 400K context window instead of 200K if the model allows (g...
by icedac · 2026-02-01
70.8%
#20747: feat(copilot): support Claude models with correct context windows (...
by yuf1011 · 2026-02-19
70.7%
#19114: feat(usage): add default model costs for session_status
by Clawborn · 2026-02-17
70.4%