`opus` alias defaults to Opus 4.1 on Vertex AI, but Opus 4.5 on direct API

Resolved 💬 8 comments Opened Jan 16, 2026 by grantcarthew Closed Feb 28, 2026
This issue was raised by Claude Code after searching for duplicates using gh search issues.

Description

When using Claude Code with Vertex AI (CLAUDE_CODE_USE_VERTEX=1), the opus model alias resolves to claude-opus-4-1@20250805. However, with the direct Anthropic API, opus resolves to Opus 4.5.

This asymmetry causes issues when a GCP project has Opus 4.5 available but not Opus 4.1.

Environment

  • Claude Code version: 2.1.7
  • Platform: macOS (arm64)
  • Provider: Google Cloud Vertex AI
  • Region: us-east5

Steps to Reproduce

  1. Configure Claude Code for Vertex AI:

``bash
export CLAUDE_CODE_USE_VERTEX=1
export ANTHROPIC_VERTEX_PROJECT_ID=<your-project>
``

  1. Start Claude Code with the opus model:

``bash
claude --model opus
``

  1. Observe error:

``
API Error: 404 {"error":{"code":404,"message":"Publisher Model
projects/<project>/locations/us-east5/publishers/anthropic/models/claude-opus-4-1@20250805
was not found or your project does not have access to it."}}
``

Root Cause

The model resolution logic uses different defaults per provider:

function tqT() {
  if (process.env.ANTHROPIC_DEFAULT_OPUS_MODEL)
    return process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;
  if (wD() === "firstParty")
    return z3().opus45;  // Direct API → Opus 4.5
  return z3().opus41;     // Vertex/Bedrock → Opus 4.1
}

Workaround

Set the environment variable to override:

export ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-4-5@20251101"

Suggested Fix

  1. Update the Vertex/Bedrock default to Opus 4.5 (matching direct API behavior), or
  2. Document the ANTHROPIC_DEFAULT_OPUS_MODEL environment variable for users who need to override

Related Issues

  • #17760 - ANTHROPIC_DEFAULT_OPUS_MODEL env var not honored when selecting from /model list
  • #13647 - Model selection defaults to Opus 4.1 when Opus 4.5 is selected

View original on GitHub ↗

This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗