[BUG] Vertex/Bedrock subagents silently downgraded to older models (Sonnet 4.5, Opus 4.1)
Bug Description
When using Claude Code with Vertex AI (CLAUDE_CODE_USE_VERTEX=1), subagent model resolution silently downgrades abstract model aliases to significantly older versions compared to first-party API users. This is undocumented and misleading.
Root Cause
The B8() function resolves abstract aliases (sonnet, opus, haiku) by calling provider-specific functions that hardcode older models for non-firstParty providers:
// CN() - "Current Sonnet"
function CN() {
if (process.env.ANTHROPIC_DEFAULT_SONNET_MODEL) return process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;
if (E_() !== "firstParty") return b8().sonnet45; // Vertex/Bedrock → Sonnet 4.5
return b8().sonnet46; // Anthropic API → Sonnet 4.6
}
// tI() - "Current Opus"
function tI() {
if (process.env.ANTHROPIC_DEFAULT_OPUS_MODEL) return process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;
if (E_() === "firstParty") return b8().opus46; // Anthropic API → Opus 4.6
return b8().opus41; // Vertex/Bedrock → Opus 4.1 (!!)
}
Effective model mapping
| Alias | firstParty (Anthropic API) | Vertex/Bedrock |
|-------|---------------------------|----------------|
| sonnet | Sonnet 4.6 | Sonnet 4.5 (claude-sonnet-4-5@20250929) |
| opus | Opus 4.6 | Opus 4.1 (claude-opus-4-1@20250805) |
| haiku | Haiku 4.5 | Haiku 4.5 (same) |
Why This Is a Problem
- Opus downgrade skips two major versions — Vertex users get Opus 4.1 instead of 4.6, despite 4.6 being GA on Vertex.
- Undocumented — The Vertex AI docs don't mention that abstract aliases resolve to older models.
- Misleading UI — The
/modelpicker shows "Sonnet 4.6" and the system prompt references "Sonnet 4.6" for Vertex users, but subagents spawned withmodel: "sonnet"silently get 4.5. - Affects all plugins — Any plugin agent definition using
model: sonnetormodel: opus(e.g., feature-dev, pr-review-toolkit, code-review) is affected. - Models are available — Google's own docs confirm Sonnet 4.6 and Opus 4.6 are GA in us-east5, europe-west1, asia-southeast1, and global endpoints.
Environment
- Claude Code version: 2.1.68
CLAUDE_CODE_USE_VERTEX=1CLOUD_ML_REGION=us-east5- Platform: macOS (darwin arm64)
Workaround
Setting explicit env vars bypasses the downgrade:
export ANTHROPIC_DEFAULT_SONNET_MODEL='claude-sonnet-4-6'
export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-6'
Expected Behavior
Abstract aliases should resolve to the same model generation across all providers, or at minimum this behavior should be documented and visible in the UI when a downgrade occurs.
Related
- #18674 (model version override env vars)
6 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Not a duplicate of #25530, #18447, or #29519. Those issues report the
opusalias downgrade only. This issue additionally documents:sonnetalias is also affected — resolves to Sonnet 4.5 on Vertex/Bedrock instead of 4.6Code path (extracted from binary)
The
B8()model resolution function calls provider-specific "current model" functions:The
b8()function returns provider-specific model IDs. For Vertex:b8().sonnet45→claude-sonnet-4-5@20250929b8().sonnet46→claude-sonnet-4-6b8().opus41→claude-opus-4-1@20250805b8().opus46→claude-opus-4-6Both models are GA on Vertex (us-east5, europe-west1, asia-southeast1, global).
Related issues
+1
Just noticed the same issue, env var workaround is effective but be good to get this fixed properly.
edit so the workaround knocks out the
[1m](long context) models. You can set the env vars to those instead, but you can't have both regular and 1m both available in the model picker. So the workaround does have some problems.@blois if this is "completed" does that mean the problematic behaviour is fixed and if so in which version? Thx.
I see this is listed as fixed in the relnotes for 2.1.73 but it's stills screwy.
For
/modelI get:Default Sonnet 4.5
Sonnet 4.6
Sonnet 4.6 1M
Opus 4.1
Opus 4.6
Opus 4.6 1M
Haiku.
Next test spawning an opus and sonnet subagent with different main model selection:
Sonnet 4.5: Opus 4.6, Sonnet 4.5@20250929
Sonnet 4.6: Opus 4.6, Sonnet 4.6.
Sonnet 4.6 1M: Opus 4.6, Sonnet 4.6 1M.
Opus 4.1: Opus 4.6, Sonnet 4.5@20250929
Opus 4.6: Opus 4.6, Sonnet 4.5@20250929
Opus 4.6 1M: Opus 4.6 1M, Sonnet 4.5@20250929
Haiku: Opus 4.6, Sonnet Sonnet 4.5@20250929
So Opus is ok in that you get 4.6 or 4.6-1M if that's the parent, but Sonnet is still screwy - you get 4.6/4.6-1M if that's the parent, but otherwise still getting 4.5.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.