[BUG] WebFetch tool in Claude Code SDK calls US-region model when using Bedrock APAC region, causing 400 The provided model identifier is invalid

Resolved 💬 3 comments Opened Sep 26, 2025 by ShibuyaZone Closed Sep 29, 2025

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?

Describe the bug

When running inference on AWS Bedrock with an APAC-region Claude model (e.g. apac.anthropic.claude-3-5-sonnet-*), if a tool invocation triggers WebFetch (web research) internally, the SDK unexpectedly attempts to call a US-region model (for example us.anthropic.claude-3-5-haiku-20241022-v1:0).
Because my Bedrock account is limited to the APAC region, this internal call is not permitted and the API responds:

API Error (us.anthropic.claude-3-5-haiku-20241022-v1:0): 
400 The provided model identifier is invalid.

Actual behavior

I think WebFetch internally calls a hard-coded US-region model (us.anthropic.claude-3-5-haiku-20241022-v1:0), leading to:

400 The provided model identifier is invalid.

Environment

  • Claude Code SDK version: 0.0.20
  • AWS Bedrock region: ap-northeast-1 (APAC)
  • Python version: 3.12
  • OS: Ubuntu 22.0.4 LTS

What Should Happen?

WebFetch (or any internal tool) should respect the region of the currently configured model and not attempt to call a US-region model when using an APAC-region Bedrock endpoint.

Error Messages/Logs

API Error (us.anthropic.claude-3-5-haiku-20241022-v1:0): 400 The provided model identifier is invalid.

Steps to Reproduce

  • Use Claude Code SDK with AWS Bedrock, specifying an APAC region model (e.g. ANTHROPIC_MODEL='apac.anthropic.claude-3-7-sonnet-20250219-v1:0').
  • Trigger a tool invocation that requires WebFetch (for example, navigating to a URL or performing a web search).
  • Observe the logs: the SDK tries to call a US-region Haiku model and fails with a 400 error.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

1.0.124

Platform

AWS Bedrock

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

This makes it impossible to use WebFetch in APAC regions even when the primary model is correctly configured for APAC.

View original on GitHub ↗

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