fix(model-router): add claude-sonnet-5 catalog entry; classify recon subagents as light - #1609
Open
pimmink wants to merge 1 commit into
Open
fix(model-router): add claude-sonnet-5 catalog entry; classify recon subagents as light#1609pimmink wants to merge 1 commit into
pimmink wants to merge 1 commit into
Conversation
…apability profile Fixes routing bypass #2192: claude-sonnet-5 was absent from MODEL_CAPABILITY_TIER, causing isKnownModel()=false and every routing decision to be bypassed regardless of tier_models configuration. Changes: - model-router.ts: add 'claude-sonnet-5': 'standard' to MODEL_CAPABILITY_TIER, add cost table entry, add capability profile (reasoning:false, tools:true, vision:true) - complexity-classifier.ts: add 'codebase-mapper' and 'scout' as 'light' in UNIT_TYPE_TIERS - tests/model-router.test.ts: 3 regression tests - tests/complexity-classifier.test.ts: 3 regression tests Closes #2192
Contributor
🟡 PR Risk Report — MEDIUM
Affected Systems
File Breakdown
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two catalog gaps discovered in v1.12.0 during production configuration work:
1.
claude-sonnet-5absent fromMODEL_CAPABILITY_TIERGitHub Copilot, Anthropic direct, Vertex, and Bedrock all serve
claude-sonnet-5as GA.isKnownModel("claude-sonnet-5")returnsfalsebecause the model has no entry inMODEL_CAPABILITY_TIER. Since #2192, an unknown configured model causesresolveModelForComplexityto short-circuit and return that model unconditionally —routing is silently bypassed for every task in that phase.
Users who set
models.<phase>: claude-sonnet-5inPREFERENCES.mdlose dynamicdowngrade to haiku for light tasks and lose the escalation chain entirely.
tier_models.standard: claude-sonnet-5works correctly (used as dispatch string),but the
models.*ceiling path does not.The model is already registered in
claude-code-cli/models.js— this is a catalog-onlyomission in
model-router.ts.2. Recon subagents (
codebase-mapper,scout) dispatched at standard tierAll subagent unit types default to
"standard"via theUNIT_TYPE_TIERS[unitType] ?? "standard"fallback incomplexity-classifier.ts. Read-only filesystem scanning agents have no reasoning requirement and should dispatch to haiku.Changes
model-router.ts: addsclaude-sonnet-5toMODEL_CAPABILITY_TIER(standard),MODEL_COST_PER_1K_INPUT, andMODEL_CAPABILITY_PROFILEScomplexity-classifier.ts: addssubagent/codebase-mapperandsubagent/scouttoUNIT_TYPE_TIERSaslighttests/model-router.test.ts: regression tests for sonnet-5 catalog presence and routing-not-bypassed behaviour; addsMODEL_CAPABILITY_TIERto importstests/complexity-classifier.test.ts: regression tests for subagent light tierNon-breaking
Zero deletions. No changes to the #2192 bail-out logic. Existing tests unchanged.
subagent/security-auditor,subagent/code-reviewer, and all other analysis agents remain at the"standard"default.Capability profile rationale for
claude-sonnet-5Scores are conservative, derived from published Anthropic benchmarks:
codingdebuggingresearchreasoningspeedlongContextinstructionCloses #1612