[BUG] Bedrock sub-agent model mapping uses us. prefix in ap-northeast-2 region

Resolved 💬 2 comments Opened Feb 11, 2026 by oy-dakrink Closed Feb 16, 2026

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?

When using Claude Code with AWS Bedrock in ap-northeast-2 (Seoul) region, sub-agents (Task tool with model: "sonnet" or model: "haiku") fail because Claude Code resolves model aliases to US-prefixed inference profile IDs (us.anthropic.claude-*) which are not available in the APAC region.

This is the same root cause as the previously fixed issue #10166 (EU region), but for APAC regions.

Error Message

API Error (us.anthropic.claude-sonnet-4-5-20250929-v1:0): 400 The provided model identifier is invalid.
API Error (us.anthropic.claude-haiku-4-5-20251001-v1:0): 400 The provided model identifier is invalid.

Expected Behavior

Claude Code should resolve model aliases to region-appropriate inference profile IDs:

  • In ap-northeast-2: use global.anthropic.claude-sonnet-4-5-* or apac.anthropic.claude-sonnet-4-5-*
  • In eu-central-1: use global.anthropic.claude-* or eu.anthropic.claude-*
  • In us-east-1: use us.anthropic.claude-*

Or preferably use global. prefix which works across all regions.

Actual Behavior

Claude Code hardcodes us. prefix for sub-agent model resolution regardless of the configured AWS region.

Main model (Opus 4.6) works fine because it's configured with full ARN:

ANTHROPIC_MODEL=arn:aws:bedrock:ap-northeast-2:<ACCOUNT_ID>:inference-profile/global.anthropic.claude-opus-4-6-v1

But sub-agents spawned with model: "sonnet" or model: "haiku" use us. prefixed IDs internally.

Available Models in ap-northeast-2

| Model ID | Status |
|----------|--------|
| global.anthropic.claude-sonnet-4-5-20250929-v1:0 | ✅ ACTIVE |
| global.anthropic.claude-haiku-4-5-20251001-v1:0 | ✅ ACTIVE |
| us.anthropic.claude-sonnet-4-5-20250929-v1:0 | ❌ NOT AVAILABLE |
| us.anthropic.claude-haiku-4-5-20251001-v1:0 | ❌ NOT AVAILABLE |

Workaround

Setting environment variables in settings.json:

{
  "env": {
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "arn:aws:bedrock:ap-northeast-2:<ACCOUNT_ID>:inference-profile/global.anthropic.claude-sonnet-4-5-20250929-v1:0",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "arn:aws:bedrock:ap-northeast-2:<ACCOUNT_ID>:inference-profile/global.anthropic.claude-haiku-4-5-20251001-v1:0"
  }
}

Steps to Reproduce

  1. Configure Claude Code with AWS Bedrock in ap-northeast-2
  2. Set CLAUDE_CODE_USE_BEDROCK=1
  3. Set ANTHROPIC_MODEL to a global Opus inference profile ARN
  4. Spawn a sub-agent with model: "sonnet" or model: "haiku" (e.g., Task tool)
  5. Sub-agent fails with "The provided model identifier is invalid"

Related Issues

  • #10166 - Same bug for EU region (CLOSED/fixed, but APAC still affected)
  • #18674 - Feature request for model version overrides

Claude Code Version

2.1.39

Platform

AWS Bedrock

Operating System

macOS (Darwin 24.6.0)

View original on GitHub ↗

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