Bug: --continue flag uses wrong model ID for EU region (Bedrock)
Description
When using Claude Code with AWS Bedrock in eu-central-1 region, the --continue flag fails because it attempts to use the US Haiku model identifier which is not available in EU regions.
Error Message
% claude --continue
▗ ▗ ▖ ▖ Claude Code v2.0.25
Sonnet 4.5 · API Usage Billing
▘▘ ▝▝ ~/Develop/claude-code-stats
> Warmup
⎿ API Error (us.anthropic.claude-3-5-haiku-20241022-v1:0): 400 The provided model identifier is invalid.
% claude
▗ ▗ ▖ ▖ Claude Code v2.0.25
Sonnet 4.5 · API Usage Billing
▘▘ ▝▝ ~/Develop/claude-code-stats
Expected Behavior
When using --continue with AWS Bedrock in eu-central-1, Claude Code should use the EU-compatible model identifier:
eu.anthropic.claude-3-5-haiku-20241022-v1:0(EU Haiku)
Instead of:
us.anthropic.claude-3-5-haiku-20241022-v1:0(US Haiku)- Entire session being lost (won't appear anymore with --resume)
Environment
- Claude Code Version: v2.0.25
- Platform: macOS (Darwin 24.6.0)
- AWS Region:
eu-central-1(confirmed viaAWS_DEFAULT_REGION) - Provider: AWS Bedrock (
CLAUDE_CODE_USE_BEDROCK=1) - Primary Model: Sonnet 4.5 (works fine for new sessions)
Relevant Environment Variables
AWS_DEFAULT_REGION=eu-central-1
CLAUDE_CODE_USE_BEDROCK=1
CLAUDE_CODE_ENTRYPOINT=cli
Steps to Reproduce
- Configure Claude Code to use AWS Bedrock in
eu-central-1region - Set environment:
export AWS_DEFAULT_REGION=eu-central-1 - Set environment:
export CLAUDE_CODE_USE_BEDROCK=1 - Start a new session:
claude(works fine) - Try to continue the session:
claude --continue - Error occurs: "The provided model identifier is invalid"
Root Cause
The warmup phase when using --continue appears to be hardcoded to use US model identifiers (us.anthropic.claude-3-5-haiku-20241022-v1:0) regardless of the AWS region configuration.
Impact
--continueis completely broken for all EU Bedrock users- No workaround available - users cannot resume previous sessions
- Forces users to start new sessions every time, losing conversation context
Suggested Fix
Claude Code should:
- Detect the AWS region from environment (
AWS_DEFAULT_REGION) or Bedrock configuration - Use region-appropriate model identifiers for all operations including
--continue - Map
us.*models toeu.*models when in EU regions - Apply this logic consistently across all warmup and model selection code paths
Example Region Mapping
const modelIdByRegion = {
'us-east-1': 'us.anthropic.claude-3-5-haiku-20241022-v1:0',
'us-west-2': 'us.anthropic.claude-3-5-haiku-20241022-v1:0',
'eu-central-1': 'eu.anthropic.claude-3-5-haiku-20241022-v1:0',
'eu-west-1': 'eu.anthropic.claude-3-5-haiku-20241022-v1:0',
'eu-west-2': 'eu.anthropic.claude-3-5-haiku-20241022-v1:0',
// ... other regions
};
Workaround
None available. Users must avoid --continue and start new sessions each time.
I'm also investigating cross-region issues. In your case @jr42, just pointing out that Claude Code documentation refers to AWS_REGION and not AWS_DEFAULT_REGION to select the proper region.
https://docs.claude.com/en/docs/claude-code/amazon-bedrock#3-configure-claude-code
I'm also investigating cross-region issues. In your case @jr42, just pointing out that Claude Code documentation refers to
AWS_REGIONand notAWS_DEFAULT_REGIONto select the proper region.
Same behavior experienced here with AWS_REGION=eu-central-1.
Same issue affects WebFetch tool
This hardcoded model ID issue also affects the WebFetch tool in EU regions.
Error with WebFetch
API Error (us.anthropic.claude-3-5-haiku-20241022-v1:0): 400 The provided model identifier is invalid.
WebFetch internally uses a Haiku model to process web content, but it's hardcoded to use the US model ID regardless of region.
Environment
- Claude Code Version: v2.0.28
- AWS Region:
eu-central-1 - Provider: AWS Bedrock (
CLAUDE_CODE_USE_BEDROCK=1)
Workaround
Setting the environment variable fixes WebFetch:
export ANTHROPIC_DEFAULT_HAIKU_MODEL="eu.anthropic.claude-haiku-4-5-20251001-v1:0"
Note: Must use inference profile ID (with eu. prefix), not direct model ID. AWS Bedrock requires inference profiles for on-demand throughput.
Available EU Inference Profiles
aws bedrock list-inference-profiles --query 'inferenceProfileSummaries[?contains(inferenceProfileName, `Haiku`)]'
Returns:
eu.anthropic.claude-3-haiku-20240307-v1:0(Claude 3 Haiku)eu.anthropic.claude-haiku-4-5-20251001-v1:0(Claude 4.5 Haiku)global.anthropic.claude-haiku-4-5-20251001-v1:0(Global profile)
Root Cause
Same as --continue: hardcoded US model identifiers throughout Claude Code codebase. Affects multiple features:
- ✅
--continueflag (already documented in this issue) - ✅ WebFetch tool (documented here)
- ❓ Potentially other internal tools using Haiku
Suggested Fix
The proposed region mapping solution would fix both --continue and WebFetch. Consider also supporting ANTHROPIC_DEFAULT_HAIKU_MODEL environment variable as an override mechanism.
I found a workaround:
type /model and change it to Opus and then revert it back to Default again
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
pls fix it! 🙏