[BUG] Agent system and WebFetch fail with Bedrock EU regions - model region not respected
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Description: When using Claude Code with AWS Bedrock in eu-central-1 region, the agent system and WebFetch tool fail with "400 The provided model identifier is invalid" errors.
Environment:
- AWS_REGION=eu-central-1
- ANTHROPIC_MODEL=eu.anthropic.claude-sonnet-4-5-20250929-v1:0
- CLAUDE_CODE_USE_BEDROCK=1
The tools attempt to use US region model IDs (us.anthropic.claude-) instead of EU region IDs (eu.anthropic.claude-) when spawning subprocesses or agents.
What Should Happen?
Expected: Tools should respect AWS_REGION and use corresponding regional model IDs Actual: Tools hardcode US region model IDs, causing Bedrock to reject them
Error Messages/Logs
Steps to Reproduce
Test Case 1: Agent system (Task tool)
- Create an agent configuration file:
.claude/agents/test-agent.md
---
name: test-agent
description: A test agent
model: sonnet
---
You are a test agent.
- In Claude Code, invoke the agent:
> as test-agent say hello
- Or programmatically via Task tool:
Use Task tool with:
- subagent_type: "test-agent"
- prompt: "Say hello"
Expected Result: Agent should use eu.anthropic.claude-sonnet-4-5-20250929-v1:0 or equivalent EU model
Actual Result:
API Error (us.anthropic.claude-sonnet-4-5-20250929-v1:0): 400 The provided model identifier is invalid.
Test Case 2: WebFetch tool
-
Configure Claude Code with Bedrock EU region (as above)
-
Use WebFetch tool:
WebFetch tool with:
- url: "https://example.com"
- prompt: "Get the page content"
Expected Result: WebFetch should use EU region model IDs for processing
Actual Result:
API Error (us.anthropic.claude-3-5-haiku-20241022-v1:0): 400 The provided model identifier is invalid.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.0.31 (Claude Code)
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
No response
Found 2 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/10166
- https://github.com/anthropics/claude-code/issues/5108
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
I had the same issue. With every new release of Claude Code, it's always trying hard to break Bedrock integration on the chat UI, I have to switch to terminal mode to make it work again.
Update: It worked when I came back to v2.0.28.
I have the same problem using the Agent SDK @anthropic-ai/claude-agent-sdk. I have not been able to work around the issue by e.g. setting ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION.
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! 🙏