Skip to content

fix(model-router): add claude-sonnet-5 catalog entry; classify recon subagents as light - #1609

Open
pimmink wants to merge 1 commit into
open-gsd:mainfrom
pimmink:fix/model-router-sonnet5-catalog
Open

fix(model-router): add claude-sonnet-5 catalog entry; classify recon subagents as light#1609
pimmink wants to merge 1 commit into
open-gsd:mainfrom
pimmink:fix/model-router-sonnet5-catalog

Conversation

@pimmink

@pimmink pimmink commented Aug 6, 2026

Copy link
Copy Markdown

Problem

Two catalog gaps discovered in v1.12.0 during production configuration work:

1. claude-sonnet-5 absent from MODEL_CAPABILITY_TIER

GitHub Copilot, Anthropic direct, Vertex, and Bedrock all serve claude-sonnet-5 as GA.
isKnownModel("claude-sonnet-5") returns false because the model has no entry in
MODEL_CAPABILITY_TIER. Since #2192, an unknown configured model causes
resolveModelForComplexity to short-circuit and return that model unconditionally —
routing is silently bypassed for every task in that phase.

Users who set models.<phase>: claude-sonnet-5 in PREFERENCES.md lose dynamic
downgrade to haiku for light tasks and lose the escalation chain entirely.
tier_models.standard: claude-sonnet-5 works 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-only
omission in model-router.ts.

2. Recon subagents (codebase-mapper, scout) dispatched at standard tier

All subagent unit types default to "standard" via the UNIT_TYPE_TIERS[unitType] ?? "standard" fallback in complexity-classifier.ts. Read-only filesystem scanning agents have no reasoning requirement and should dispatch to haiku.

Changes

  • model-router.ts: adds claude-sonnet-5 to MODEL_CAPABILITY_TIER (standard), MODEL_COST_PER_1K_INPUT, and MODEL_CAPABILITY_PROFILES
  • complexity-classifier.ts: adds subagent/codebase-mapper and subagent/scout to UNIT_TYPE_TIERS as light
  • tests/model-router.test.ts: regression tests for sonnet-5 catalog presence and routing-not-bypassed behaviour; adds MODEL_CAPABILITY_TIER to imports
  • tests/complexity-classifier.test.ts: regression tests for subagent light tier

Non-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-5

Scores are conservative, derived from published Anthropic benchmarks:

Dimension Sonnet 4.6 Sonnet 5 Delta Rationale
coding 85 90 +5 SWE-bench improvement
debugging 80 85 +5 Correlated with coding
research 75 80 +5 Improved tool use
reasoning 80 87 +7 Most notable improvement
speed 60 55 -5 Slightly larger model
longContext 75 80 +5 1M context window
instruction 85 88 +3 More instruction-faithful

Closes #1612

…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
@pimmink
pimmink requested a review from jeremymcs as a code owner August 6, 2026 12:34
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

🟡 PR Risk Report — MEDIUM

Files changed 4
Systems affected 1
Overall risk 🟡 MEDIUM

Affected Systems

Risk System
🟡 medium Model System
File Breakdown
Risk File Systems
🟡 src/resources/extensions/gsd/model-router.ts Model System
src/resources/extensions/gsd/complexity-classifier.ts (unclassified)
src/resources/extensions/gsd/tests/complexity-classifier.test.ts (unclassified)
src/resources/extensions/gsd/tests/model-router.test.ts (unclassified)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(model-router): claude-sonnet-5 absent from MODEL_CAPABILITY_TIER causes silent routing bypass

1 participant