[BUG] Claude Code changes model identifier mid-conversation on AWS Bedrock (eu to us region)

Resolved 💬 13 comments Opened Aug 4, 2025 by khromov Closed Jan 7, 2026

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [x] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: LiteLLM
  • Claude CLI version: 1.0.67 (Claude Code)
  • Operating System: macOS 15.6
  • Terminal: Terminal / oh-my-zsh

Bug Description

I have a very odd bug where Claude Code switches the model used in a long conversation. I am using the eu sonnet model via Bedrock, proxied through a LiteLLM proxy. (Computer => LiteLLM => Bedrock)

The model used is eu.anthropic.claude-sonnet-4-20250514-v1:0

After conversing with the model for a while, suddenly this message appears:

  ⎿  API Error (500 {"error":{"message":"{\"message\":\"The provided model identifier is invalid.\"}. Received Model Group=us.anthropic.claude-sonnet-4-20250514-v1:0\nAvailable Model Group Fallbacks=None\nError doing the fallback: list index out of range","type":"None","param":"None","code":"500"}}) · Retrying in 1 seconds… (attempt 1/10)

Note the model identifier us.anthropic.claude-sonnet-4-20250514 with the us prefix, not eu. We can see from LiteLLM logs that the wrong model identifier is in fact being sent from Claude Code.

Closing CC and then using --resume allows the conversation to continue for a short while before the issue reappears.

Steps to Reproduce

  1. Run Claude Code with: AWS_REGION=eu-west-1 AWS_DEFAULT_REGION=eu-west-1 ANTHROPIC_MODEL=eu.anthropic.claude-sonnet-4-20250514-v1:0 ANTHROPIC_AUTH_TOKEN=REDACTED ANTHROPIC_BEDROCK_BASE_URL=https://litellm.REDACTED/bedrock CLAUDE_CODE_SKIP_BEDROCK_AUTH=1 CLAUDE_CODE_USE_BEDROCK=1 claude
  2. Ask CC to do something that requires a couple of minutes of agentic work
  3. The issue appears.

Expected Behavior

Always use the configured model from ANTHROPIC_MODEL.

Actual Behavior

Changes model randomly.

Additional Context

-

View original on GitHub ↗

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