claude-code - 💡(How to fix) Fix [BUG] /model persists us. prefix for Opus 4.6 on EU Bedrock (eu-west-1), causing 400 in new sessions [3 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46313Fetched 2026-04-11 06:23:35
View on GitHub
Comments
3
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×4commented ×3closed ×1

Error Message

API Error (us.anthropic.claude-opus-4-6-v1): 400 The provided model identifier is invalid.

Code Example

API Error (us.anthropic.claude-opus-4-6-v1): 400 The provided model identifier is invalid.

---

{
     "env": {
       "CLAUDE_CODE_USE_BEDROCK": "1",
       "AWS_REGION": "eu-west-1",
       "AWS_PROFILE": "your-profile"
     }
   }

---

# Only eu. and global. profiles exist in eu-west-1:
aws bedrock list-inference-profiles --region eu-west-1 \
  --query 'inferenceProfileSummaries[?contains(inferenceProfileId,`opus-4-6`)].inferenceProfileId'
# ["eu.anthropic.claude-opus-4-6-v1", "global.anthropic.claude-opus-4-6-v1"]
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When using AWS Bedrock in eu-west-1, running /model and selecting Opus 4.6 writes us.anthropic.claude-opus-4-6-v1 into ~/.claude/settings.json. This model ID is invalid in eu-west-1 — only eu.anthropic.claude-opus-4-6-v1 and global.anthropic.claude-opus-4-6-v1 exist there.

The session where /model was used continues to work (presumably resolves the model differently at runtime), but every new session reads the persisted us. model ID from settings.json and fails with:

API Error (us.anthropic.claude-opus-4-6-v1): 400 The provided model identifier is invalid.

Sonnet 4.6 is unaffected — /model correctly persists eu.anthropic.claude-sonnet-4-6 for Sonnet.

Expected Behavior

/model should persist either:

  • The short alias (opus) and resolve the regional prefix at runtime, OR
  • The correct regional prefix (eu. when AWS_REGION=eu-west-1)

Steps to Reproduce

  1. Configure Bedrock with AWS_REGION=eu-west-1:
    {
      "env": {
        "CLAUDE_CODE_USE_BEDROCK": "1",
        "AWS_REGION": "eu-west-1",
        "AWS_PROFILE": "your-profile"
      }
    }
  2. Start Claude Code, run /model, select Opus 4.6
  3. Send any message — works in this session
  4. Check ~/.claude/settings.json — shows "model": "us.anthropic.claude-opus-4-6-v1"
  5. Open a new Claude Code session — fails with 400

Verification

# Only eu. and global. profiles exist in eu-west-1:
aws bedrock list-inference-profiles --region eu-west-1 \
  --query 'inferenceProfileSummaries[?contains(inferenceProfileId,`opus-4-6`)].inferenceProfileId'
# ["eu.anthropic.claude-opus-4-6-v1", "global.anthropic.claude-opus-4-6-v1"]

Environment

  • Claude Code version: 2.1.100 (bug NOT present in 2.1.97)
  • API provider: Amazon Bedrock
  • AWS region: eu-west-1
  • OS: macOS Darwin 25.3.0
  • Shell: zsh

Related Issues

  • #20594 — ANTHROPIC_MODEL ignored, cross-region inference profile used instead
  • #27241 — Haiku model ID missing cross-region prefix
  • #25193 — Teammates receive normalized model ID instead of Bedrock model ID

extent analysis

TL;DR

The issue can be fixed by modifying the /model command to persist the correct regional prefix (eu.) when AWS_REGION=eu-west-1, or by using the short alias (opus) and resolving the regional prefix at runtime.

Guidance

  • Verify that the AWS_REGION environment variable is correctly set to eu-west-1 before running the /model command.
  • Check the ~/.claude/settings.json file to ensure that the persisted model ID is correct after running the /model command.
  • Consider modifying the /model command to use the short alias (opus) instead of the full model ID, allowing the regional prefix to be resolved at runtime.
  • If using the full model ID, ensure that the regional prefix is correctly set to eu. when AWS_REGION=eu-west-1.

Example

No code snippet is provided as the issue is related to the configuration and behavior of the /model command, rather than a specific code implementation.

Notes

The issue appears to be specific to the Opus 4.6 model and the eu-west-1 region, and may not affect other models or regions. The Sonnet 4.6 model is unaffected, and the issue is not present in Claude Code version 2.1.97.

Recommendation

Apply a workaround by manually editing the ~/.claude/settings.json file to use the correct regional prefix (eu.) for the Opus 4.6 model, until a permanent fix is implemented in a future version of Claude Code.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING