← Back to PRs

#20123: Add Claude Sonnet 4.6 to OpenCode Zen model catalog

by Clawborn open 2026-02-18 15:02 View on GitHub →
agents size: XS trusted-contributor
## 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