From 33c4ed2eaffb1d3584db690c80372666e557840b Mon Sep 17 00:00:00 2001 From: Bellman <54757707+Yeachan-Heo@users.noreply.github.com> Date: Wed, 1 Jul 2026 06:47:26 +0900 Subject: [PATCH] fix(model-routing): support Claude Sonnet 5 defaults (#3370) * fix(model-routing): support Claude Sonnet 5 defaults * chore(model-routing): drop generated build artifacts --------- Co-authored-by: Codex Review --- benchmark/README.md | 2 +- benchmark/quick_test.sh | 4 ++-- benchmark/results/README.md | 2 +- benchmark/run_benchmark.py | 6 +++--- benchmark/run_full_comparison.sh | 4 ++-- benchmark/run_omc.sh | 4 ++-- benchmark/run_vanilla.sh | 4 ++-- benchmarks/debugger/prompts/build-fixer.md | 2 +- examples/advanced-usage.ts | 2 +- scripts/pre-tool-enforcer.mjs | 2 +- seminar/demos/demo-0-live-audience.md | 4 ++-- src/__tests__/bedrock-model-routing.test.ts | 14 +++++++------- src/__tests__/delegation-enforcer.test.ts | 8 ++++---- src/__tests__/tier0-docs-consistency.test.ts | 8 ++++---- src/__tests__/types.test.ts | 6 +++--- src/config/__tests__/loader.test.ts | 8 ++++---- src/config/__tests__/models.test.ts | 2 +- src/config/models.ts | 6 +++--- src/features/delegation-enforcer.ts | 2 +- src/hooks/think-mode/__tests__/index.test.ts | 12 ++++++------ src/team/model-contract.ts | 4 ++-- 21 files changed, 53 insertions(+), 53 deletions(-) diff --git a/benchmark/README.md b/benchmark/README.md index 7c9896ef0..a5d2c64ac 100644 --- a/benchmark/README.md +++ b/benchmark/README.md @@ -63,7 +63,7 @@ Run vanilla Claude Code benchmark: **Options:** - `--limit N` - Limit to N instances (default: all) - `--skip N` - Skip first N instances (default: 0) -- `--model MODEL` - Claude model to use (default: claude-sonnet-4-6-20260217) +- `--model MODEL` - Claude model to use (default: claude-sonnet-5) - `--timeout SECS` - Timeout per instance (default: 300) **Examples:** diff --git a/benchmark/quick_test.sh b/benchmark/quick_test.sh index 1d1d37e67..bf763228d 100755 --- a/benchmark/quick_test.sh +++ b/benchmark/quick_test.sh @@ -36,7 +36,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # Quick test configuration TEST_LIMIT=5 -MODEL="claude-sonnet-4-6-20260217" +MODEL="claude-sonnet-5" TIMEOUT="180" # 3 minutes per instance for quick test # Parse arguments @@ -61,7 +61,7 @@ while [[ $# -gt 0 ]]; do echo "" echo "Options:" echo " --limit N Number of instances to test (default: 5)" - echo " --model MODEL Claude model to use (default: claude-sonnet-4-6-20260217)" + echo " --model MODEL Claude model to use (default: claude-sonnet-5)" echo " --timeout SECS Timeout per instance (default: 180)" echo " -h, --help Show this help message" exit 0 diff --git a/benchmark/results/README.md b/benchmark/results/README.md index 757e0ee65..1b0eb3609 100644 --- a/benchmark/results/README.md +++ b/benchmark/results/README.md @@ -19,7 +19,7 @@ ### Evaluation Setup -- **Model:** Claude Sonnet 4.6 (claude-sonnet-4-6-20260217) +- **Model:** Claude Sonnet 5 (claude-sonnet-5) - **Max Tokens:** 16,384 output tokens per instance - **Timeout:** 30 minutes per instance - **Workers:** 4 parallel evaluations diff --git a/benchmark/run_benchmark.py b/benchmark/run_benchmark.py index f6f1f04d7..b0ec05e25 100755 --- a/benchmark/run_benchmark.py +++ b/benchmark/run_benchmark.py @@ -58,7 +58,7 @@ class BenchmarkConfig: limit: Optional[int] = None retries: int = 3 retry_delay: int = 30 - model: str = "claude-sonnet-4-6-20260217" + model: str = "claude-sonnet-5" skip: int = 0 @@ -581,8 +581,8 @@ Examples: ) parser.add_argument( "--model", - default="claude-sonnet-4-6-20260217", - help="Claude model to use (default: claude-sonnet-4-6-20260217)", + default="claude-sonnet-5", + help="Claude model to use (default: claude-sonnet-5)", ) parser.add_argument( "--skip", diff --git a/benchmark/run_full_comparison.sh b/benchmark/run_full_comparison.sh index f32ec7a26..e4b49f235 100755 --- a/benchmark/run_full_comparison.sh +++ b/benchmark/run_full_comparison.sh @@ -37,7 +37,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # Parse arguments LIMIT="" SKIP="" -MODEL="claude-sonnet-4-6-20260217" +MODEL="claude-sonnet-5" TIMEOUT="300" SKIP_VANILLA=false SKIP_OMC=false @@ -81,7 +81,7 @@ while [[ $# -gt 0 ]]; do echo "Options:" echo " --limit N Limit to N instances (default: all)" echo " --skip N Skip first N instances (default: 0)" - echo " --model MODEL Claude model to use (default: claude-sonnet-4-6-20260217)" + echo " --model MODEL Claude model to use (default: claude-sonnet-5)" echo " --timeout SECS Timeout per instance (default: 300)" echo " --skip-vanilla Skip vanilla benchmark run" echo " --skip-omc Skip OMC benchmark run" diff --git a/benchmark/run_omc.sh b/benchmark/run_omc.sh index 2508e4fb8..6d007bc9d 100755 --- a/benchmark/run_omc.sh +++ b/benchmark/run_omc.sh @@ -38,7 +38,7 @@ LOG_FILE="$LOGS_DIR/${RUN_MODE}_${TIMESTAMP}.log" # Parse arguments LIMIT="" SKIP="" -MODEL="claude-sonnet-4-6-20260217" +MODEL="claude-sonnet-5" TIMEOUT="300" while [[ $# -gt 0 ]]; do @@ -65,7 +65,7 @@ while [[ $# -gt 0 ]]; do echo "Options:" echo " --limit N Limit to N instances (default: all)" echo " --skip N Skip first N instances (default: 0)" - echo " --model MODEL Claude model to use (default: claude-sonnet-4-6-20260217)" + echo " --model MODEL Claude model to use (default: claude-sonnet-5)" echo " --timeout SECS Timeout per instance (default: 300)" echo " -h, --help Show this help message" exit 0 diff --git a/benchmark/run_vanilla.sh b/benchmark/run_vanilla.sh index b3d2266e8..1035332d1 100755 --- a/benchmark/run_vanilla.sh +++ b/benchmark/run_vanilla.sh @@ -38,7 +38,7 @@ LOG_FILE="$LOGS_DIR/${RUN_MODE}_${TIMESTAMP}.log" # Parse arguments LIMIT="" SKIP="" -MODEL="claude-sonnet-4-6-20260217" +MODEL="claude-sonnet-5" TIMEOUT="300" while [[ $# -gt 0 ]]; do @@ -65,7 +65,7 @@ while [[ $# -gt 0 ]]; do echo "Options:" echo " --limit N Limit to N instances (default: all)" echo " --skip N Skip first N instances (default: 0)" - echo " --model MODEL Claude model to use (default: claude-sonnet-4-6-20260217)" + echo " --model MODEL Claude model to use (default: claude-sonnet-5)" echo " --timeout SECS Timeout per instance (default: 300)" echo " -h, --help Show this help message" exit 0 diff --git a/benchmarks/debugger/prompts/build-fixer.md b/benchmarks/debugger/prompts/build-fixer.md index f2e79fa04..5d4fa26bc 100644 --- a/benchmarks/debugger/prompts/build-fixer.md +++ b/benchmarks/debugger/prompts/build-fixer.md @@ -1,7 +1,7 @@ --- name: build-fixer description: Build and compilation error resolution specialist (minimal diffs, no architecture changes) -model: claude-sonnet-4-6 +model: claude-sonnet-5 --- diff --git a/examples/advanced-usage.ts b/examples/advanced-usage.ts index 4999b337f..8f647bc91 100644 --- a/examples/advanced-usage.ts +++ b/examples/advanced-usage.ts @@ -25,7 +25,7 @@ async function main() { config: { agents: { // Use a faster model for the orchestrator in dev - omc: { model: 'claude-sonnet-4-6-20260217' }, + omc: { model: 'claude-sonnet-5' }, // Override model for specific agents designer: { model: 'claude-haiku-4-5-20251001' }, writer: { model: 'claude-haiku-4-5-20251001' } diff --git a/scripts/pre-tool-enforcer.mjs b/scripts/pre-tool-enforcer.mjs index 81d155075..49da9fb19 100644 --- a/scripts/pre-tool-enforcer.mjs +++ b/scripts/pre-tool-enforcer.mjs @@ -1328,7 +1328,7 @@ async function main() { } else if (sessionHasLmSuffix) { // No model param, but the session model has a [1m] context-window suffix. // Sub-agents would inherit it and fail — the runtime strips [1m] to a bare - // Anthropic model ID (e.g. claude-sonnet-4-6) which is invalid on Bedrock. + // Anthropic model ID (e.g. claude-sonnet-5) which is invalid on Bedrock. // Fix: pass a tier alias (sonnet/haiku/opus). The Agent tool schema only accepts // tier aliases for the model param — full Bedrock IDs are rejected by the schema. const tierAlias = normalizeToCcAlias(sessionModel) || 'sonnet'; diff --git a/seminar/demos/demo-0-live-audience.md b/seminar/demos/demo-0-live-audience.md index b4af42dc8..1dc32b742 100644 --- a/seminar/demos/demo-0-live-audience.md +++ b/seminar/demos/demo-0-live-audience.md @@ -67,8 +67,8 @@ npm run dev # 불필요한 로그 숨기기 export OMC_QUIET=true -# 빠른 모델 (Sonnet 4.6) -export OMC_MODEL=anthropic/claude-sonnet-4-6 +# 빠른 모델 (Sonnet 5) +export OMC_MODEL=anthropic/claude-sonnet-5 ``` ### 타이밍 diff --git a/src/__tests__/bedrock-model-routing.test.ts b/src/__tests__/bedrock-model-routing.test.ts index a87d16a27..c659a957d 100644 --- a/src/__tests__/bedrock-model-routing.test.ts +++ b/src/__tests__/bedrock-model-routing.test.ts @@ -1,16 +1,16 @@ /** * Repro test for Bedrock model routing bug * - * Bug: On Bedrock, workers get model ID "claude-sonnet-4-6" (bare builtin default) + * Bug: On Bedrock, workers get model ID "claude-sonnet-5" (bare builtin default) * instead of inheriting the parent model. On Bedrock, this bare ID is invalid * — Bedrock requires full IDs like "us.anthropic.claude-sonnet-4-6-v1:0". * * Root cause chain: - * 1. buildDefaultConfig() → config.agents.executor.model = 'claude-sonnet-4-6' + * 1. buildDefaultConfig() → config.agents.executor.model = 'claude-sonnet-5' * (from CLAUDE_FAMILY_DEFAULTS.SONNET, because no Bedrock env vars found) - * 2. getAgentDefinitions() resolves executor.model = 'claude-sonnet-4-6' + * 2. getAgentDefinitions() resolves executor.model = 'claude-sonnet-5' * (configuredModel from config takes precedence over agent's defaultModel) - * 3. enforceModel() injects 'claude-sonnet-4-6' into Task calls + * 3. enforceModel() injects 'claude-sonnet-5' into Task calls * 4. Claude Code passes it to Bedrock API → 400 invalid model * * The defense (forceInherit) works IF CLAUDE_CODE_USE_BEDROCK=1 is in the env. @@ -103,10 +103,10 @@ describe('Bedrock model routing repro', () => { expect(getDefaultModelMedium()).toBe('global.anthropic.claude-sonnet-4-6-v1:0'); }); - it('falls back to bare "claude-sonnet-4-6" without env vars', async () => { + it('falls back to bare "claude-sonnet-5" without env vars', async () => { const { getDefaultModelMedium } = await import('../config/models.js'); // getDefaultModelMedium returns the raw config value (not normalized) - expect(getDefaultModelMedium()).toBe('claude-sonnet-4-6'); + expect(getDefaultModelMedium()).toBe('claude-sonnet-5'); }); }); @@ -132,7 +132,7 @@ describe('Bedrock model routing repro', () => { // 3. Agent definitions use full builtin model IDs from config const { getAgentDefinitions } = await import('../agents/definitions.js'); const defs = getAgentDefinitions({ config }); - expect(defs['executor'].model).toBe('claude-sonnet-4-6'); + expect(defs['executor'].model).toBe('claude-sonnet-5'); expect(defs['explore'].model).toBe('claude-haiku-4-5'); expect(defs['architect'].model).toBe('claude-opus-4-8'); diff --git a/src/__tests__/delegation-enforcer.test.ts b/src/__tests__/delegation-enforcer.test.ts index 37bbd7467..778671270 100644 --- a/src/__tests__/delegation-enforcer.test.ts +++ b/src/__tests__/delegation-enforcer.test.ts @@ -62,7 +62,7 @@ describe('delegation-enforcer', () => { description: 'Test task', prompt: 'Do something', subagent_type: 'oh-my-claudecode:executor', - model: 'claude-sonnet-4-6' + model: 'claude-sonnet-5' }; const result = enforceModel(input); @@ -109,7 +109,7 @@ describe('delegation-enforcer', () => { const result = enforceModel(input); expect(result.injected).toBe(true); - expect(result.modifiedInput.model).toBe('sonnet'); // executor defaults to claude-sonnet-4-6 + expect(result.modifiedInput.model).toBe('sonnet'); // executor defaults to claude-sonnet-5 expect(result.originalInput.model).toBeUndefined(); }); @@ -123,7 +123,7 @@ describe('delegation-enforcer', () => { const result = enforceModel(input); expect(result.injected).toBe(true); - expect(result.modifiedInput.model).toBe('sonnet'); // debugger defaults to claude-sonnet-4-6 + expect(result.modifiedInput.model).toBe('sonnet'); // debugger defaults to claude-sonnet-5 }); it('rewrites deprecated aliases to canonical agent names before injecting model', () => { @@ -167,7 +167,7 @@ describe('delegation-enforcer', () => { const resultWithDebug = enforceModel(input); expect(resultWithDebug.warning).toBeDefined(); expect(resultWithDebug.warning).toContain('Auto-injecting model'); - expect(resultWithDebug.warning).toContain('claude-sonnet-4-6'); + expect(resultWithDebug.warning).toContain('claude-sonnet-5'); expect(resultWithDebug.warning).toContain('executor'); }); diff --git a/src/__tests__/tier0-docs-consistency.test.ts b/src/__tests__/tier0-docs-consistency.test.ts index 021170334..d49edf600 100644 --- a/src/__tests__/tier0-docs-consistency.test.ts +++ b/src/__tests__/tier0-docs-consistency.test.ts @@ -123,7 +123,7 @@ describe('Tier-0 contract docs consistency', () => { const omc = readProjectFile('benchmark', 'run_omc.sh'); const fullComparison = readProjectFile('benchmark', 'run_full_comparison.sh'); const resultsReadme = readProjectFile('benchmark', 'results', 'README.md'); - const expectedModel = 'claude-sonnet-4-6-20260217'; + const expectedModel = 'claude-sonnet-5'; for (const content of [benchmarkReadme, benchmarkRunner, quickTest, vanilla, omc, fullComparison, resultsReadme]) { expect(content).toContain(expectedModel); @@ -131,7 +131,7 @@ describe('Tier-0 contract docs consistency', () => { expect(benchmarkReadme).not.toContain('claude-sonnet-4.5-20250929'); expect(benchmarkRunner).not.toContain('claude-sonnet-4-20250514'); - expect(resultsReadme).toContain('Claude Sonnet 4.6'); + expect(resultsReadme).toContain('Claude Sonnet 5'); }); it('removes dead package build aliases and keeps seminar demo model guidance current', () => { @@ -140,8 +140,8 @@ describe('Tier-0 contract docs consistency', () => { expect(packageJson.scripts).not.toHaveProperty('build:codex'); expect(packageJson.scripts).not.toHaveProperty('build:gemini'); - expect(seminarDemo).toContain('# 빠른 모델 (Sonnet 4.6)'); - expect(seminarDemo).toContain('export OMC_MODEL=anthropic/claude-sonnet-4-6'); + expect(seminarDemo).toContain('# 빠른 모델 (Sonnet 5)'); + expect(seminarDemo).toContain('export OMC_MODEL=anthropic/claude-sonnet-5'); expect(seminarDemo).not.toContain('anthropic/claude-sonnet-4-5'); }); }); diff --git a/src/__tests__/types.test.ts b/src/__tests__/types.test.ts index 427f864bd..184d5d191 100644 --- a/src/__tests__/types.test.ts +++ b/src/__tests__/types.test.ts @@ -55,14 +55,14 @@ describe('Type Tests', () => { it('should support agent configuration', () => { const config: PluginConfig = { agents: { - omc: { model: 'claude-sonnet-4-6' }, + omc: { model: 'claude-sonnet-5' }, architect: { model: 'claude-opus-4-8' }, explore: { model: 'claude-haiku-4-5' }, documentSpecialist: { model: 'claude-haiku-4-5' }, }, }; - expect(config.agents?.omc?.model).toBe('claude-sonnet-4-6'); + expect(config.agents?.omc?.model).toBe('claude-sonnet-5'); expect(config.agents?.architect?.model).toBe('claude-opus-4-8'); }); @@ -75,7 +75,7 @@ describe('Type Tests', () => { maxEscalations: 2, tierModels: { LOW: 'claude-haiku-4', - MEDIUM: 'claude-sonnet-4-6', + MEDIUM: 'claude-sonnet-5', HIGH: 'claude-opus-4-8', }, }, diff --git a/src/config/__tests__/loader.test.ts b/src/config/__tests__/loader.test.ts index 0ceb6fadd..7ebe26a84 100644 --- a/src/config/__tests__/loader.test.ts +++ b/src/config/__tests__/loader.test.ts @@ -89,28 +89,28 @@ describe("loadConfig() — auto-forceInherit for non-standard providers", () => }); it("does NOT auto-enable forceInherit when direct Claude CLAUDE_MODEL beats stale ANTHROPIC_MODEL", () => { - process.env.CLAUDE_MODEL = "claude-sonnet-4-6"; + process.env.CLAUDE_MODEL = "claude-sonnet-5"; process.env.ANTHROPIC_MODEL = "kimi-k2.6:cloud"; const config = loadConfig(); expect(config.routing?.forceInherit).toBe(false); }); it("does NOT auto-enable forceInherit when direct Claude CLAUDE_MODEL beats stale OMC tier env vars", () => { - process.env.CLAUDE_MODEL = "claude-sonnet-4-6"; + process.env.CLAUDE_MODEL = "claude-sonnet-5"; process.env.OMC_MODEL_MEDIUM = "glm-5.1:cloud"; const config = loadConfig(); expect(config.routing?.forceInherit).toBe(false); }); it("does NOT auto-enable forceInherit when direct Claude ANTHROPIC_MODEL beats stale OMC tier env vars", () => { - process.env.ANTHROPIC_MODEL = "claude-sonnet-4-6"; + process.env.ANTHROPIC_MODEL = "claude-sonnet-5"; process.env.OMC_MODEL_MEDIUM = "glm-5.1:cloud"; const config = loadConfig(); expect(config.routing?.forceInherit).toBe(false); }); it("does NOT auto-enable forceInherit for standard Anthropic API usage", () => { - process.env.ANTHROPIC_MODEL = "claude-sonnet-4-6"; + process.env.ANTHROPIC_MODEL = "claude-sonnet-5"; const config = loadConfig(); expect(config.routing?.forceInherit).toBe(false); }); diff --git a/src/config/__tests__/models.test.ts b/src/config/__tests__/models.test.ts index f05550996..868e85019 100644 --- a/src/config/__tests__/models.test.ts +++ b/src/config/__tests__/models.test.ts @@ -344,7 +344,7 @@ describe('resolveClaudeFamily() — Bedrock inference profile IDs', () => { }); it('resolves bare Anthropic model IDs', () => { - expect(resolveClaudeFamily('claude-sonnet-4-6')).toBe('SONNET'); + expect(resolveClaudeFamily('claude-sonnet-5')).toBe('SONNET'); expect(resolveClaudeFamily('claude-opus-4-6')).toBe('OPUS'); expect(resolveClaudeFamily('claude-haiku-4-5')).toBe('HAIKU'); expect(resolveClaudeFamily('claude-fable-5')).toBe('FABLE'); diff --git a/src/config/models.ts b/src/config/models.ts index 266a43d5d..ba00850fa 100644 --- a/src/config/models.ts +++ b/src/config/models.ts @@ -31,7 +31,7 @@ const TIER_ENV_KEYS: Record = { */ export const CLAUDE_FAMILY_DEFAULTS: Record = { HAIKU: 'claude-haiku-4-5', - SONNET: 'claude-sonnet-4-6', + SONNET: 'claude-sonnet-5', OPUS: 'claude-opus-4-8', FABLE: 'claude-fable-5', }; @@ -269,7 +269,7 @@ export function isBedrock(): boolean { * * These IDs must be passed through to the CLI as-is because normalizing them * to aliases like "sonnet" causes Claude Code to expand them to Anthropic API - * model names (e.g. claude-sonnet-4-6) which are invalid on Bedrock/Vertex. + * model names (e.g. claude-sonnet-5) which are invalid on Bedrock/Vertex. */ export function isProviderSpecificModelId(modelId: string): boolean { // Bedrock prefixed formats (region.anthropic.claude-*, anthropic.claude-*) @@ -294,7 +294,7 @@ export function isProviderSpecificModelId(modelId: string): boolean { * The `[1m]` suffix is a Claude Code internal annotation for the 1M context * window variant. It is valid for the parent session's API path but is * rejected by the sub-agent spawning runtime, which strips it to a bare - * Anthropic model ID (e.g., `claude-sonnet-4-6`) that is invalid on Bedrock. + * Anthropic model ID (e.g., `claude-sonnet-5`) that is invalid on Bedrock. */ export function hasExtendedContextSuffix(modelId: string): boolean { return /\[\d+[mk]\]$/i.test(modelId); diff --git a/src/features/delegation-enforcer.ts b/src/features/delegation-enforcer.ts index 7d6c5958c..d97f7cd98 100644 --- a/src/features/delegation-enforcer.ts +++ b/src/features/delegation-enforcer.ts @@ -166,7 +166,7 @@ export function enforceModel(agentInput: AgentInput): EnforcementResult { } // If model is already specified, normalize it to CC-supported aliases - // before passing through. Full IDs like 'claude-sonnet-4-6' cause 400 + // before passing through. Full IDs like 'claude-sonnet-5' cause 400 // errors on Bedrock/Vertex. (issue #1415) if (agentInput.model) { const normalizedModel = normalizeToCcAlias(agentInput.model); diff --git a/src/hooks/think-mode/__tests__/index.test.ts b/src/hooks/think-mode/__tests__/index.test.ts index 319d8d899..83a8c927f 100644 --- a/src/hooks/think-mode/__tests__/index.test.ts +++ b/src/hooks/think-mode/__tests__/index.test.ts @@ -190,8 +190,8 @@ World`); describe('switcher - getHighVariant', () => { describe('Claude models', () => { - it('should return high variant for claude-sonnet-4-6', () => { - expect(getHighVariant('claude-sonnet-4-6')).toBe('claude-sonnet-4-6-high'); + it('should return high variant for claude-sonnet-5', () => { + expect(getHighVariant('claude-sonnet-5')).toBe('claude-sonnet-5-high'); }); it('should return high variant for claude-opus-4-8', () => { @@ -199,7 +199,7 @@ World`); }); it('should return high variant for claude-3-5-sonnet', () => { - expect(getHighVariant('claude-3-5-sonnet')).toBe('claude-sonnet-4-6-high'); + expect(getHighVariant('claude-3-5-sonnet')).toBe('claude-sonnet-5-high'); }); it('should return high variant for claude-3-opus', () => { @@ -207,7 +207,7 @@ World`); }); it('should handle version with dot notation', () => { - expect(getHighVariant('claude-sonnet-4.5')).toBe('claude-sonnet-4-6-high'); + expect(getHighVariant('claude-sonnet-4.5')).toBe('claude-sonnet-5-high'); }); }); @@ -255,7 +255,7 @@ World`); describe('Prefixed models', () => { it('should preserve prefix in high variant', () => { - expect(getHighVariant('vertex_ai/claude-sonnet-4-5')).toBe('vertex_ai/claude-sonnet-4-6-high'); + expect(getHighVariant('vertex_ai/claude-sonnet-4-5')).toBe('vertex_ai/claude-sonnet-5-high'); }); it('should handle openai/ prefix', () => { @@ -539,7 +539,7 @@ World`); }; const state = hook.processChatParams('test-session', input); expect(state.modelSwitched).toBe(true); - expect(input.message.model?.modelId).toBe('claude-sonnet-4-6-high'); + expect(input.message.model?.modelId).toBe('claude-sonnet-5-high'); }); it('should not switch already high variant', () => { diff --git a/src/team/model-contract.ts b/src/team/model-contract.ts index 4461d7166..1caa744de 100644 --- a/src/team/model-contract.ts +++ b/src/team/model-contract.ts @@ -193,7 +193,7 @@ const CONTRACTS: Record = { if (model) { // Provider-specific model IDs (Bedrock, Vertex) must be passed as-is. // Normalizing them to aliases like "sonnet" causes Claude Code to expand - // them to Anthropic API names (claude-sonnet-4-6) which are invalid on + // them to Anthropic API names (claude-sonnet-5) which are invalid on // these providers. (issue #1695) const resolved = isProviderSpecificModelId(model) ? model : normalizeToCcAlias(model); args.push('--model', resolved); @@ -474,7 +474,7 @@ export function isPromptModeAgent(agentType: CliAgentType): boolean { * * When running on a non-standard provider (Bedrock, Vertex), workers need * the provider-specific model ID passed explicitly via --model. Without it, - * Claude Code falls back to its built-in default (claude-sonnet-4-6) which + * Claude Code falls back to its built-in default (claude-sonnet-5) which * is invalid on these providers. * * Resolution order: