Bedrock: default Haiku model ID missing cross-region prefix, retries on hard 403

Resolved 💬 4 comments Opened Feb 20, 2026 by q2mark Closed Mar 20, 2026

Summary

When using Claude Code with Bedrock (CLAUDE_CODE_USE_BEDROCK=1), the default Haiku model ID resolves to anthropic.claude-haiku-4-5-20251001-v1:0 (bare foundation model) instead of us.anthropic.claude-haiku-4-5-20251001-v1:0 (cross-region inference profile). This causes 403 errors for accounts that use cross-region inference profiles. Additionally, Claude Code retries these hard 403s for 3+ minutes instead of failing fast.

Environment

  • Claude Code version: 2.1.47 (also occurring in 2.1.49)
  • Platform: Bedrock with CLAUDE_CODE_USE_BEDROCK=1
  • Auth: AWS_BEARER_TOKEN_BEDROCK (Bedrock API key)
  • Main model: us.anthropic.claude-opus-4-6-v1 (works correctly)

Bug 1: Haiku model ID missing us. prefix

The main model correctly resolves with a cross-region prefix (us.anthropic.claude-opus-4-6-v1), but the Haiku model used for background tasks (e.g. tool-use risk assessment) resolves to the bare foundation model ID anthropic.claude-haiku-4-5-20251001-v1:0.

From debug logs:

[ERROR] API error (attempt 1/11): 403 403 {"Message":"User: arn:aws:iam::REDACTED is not authorized to perform: bedrock:InvokeModelWithResponseStream on resource: arn:aws:bedrock:::foundation-model/anthropic.claude-haiku-4-5-20251001-v1:0 with an explicit deny in a service control policy"}

Note the ARN targets foundation-model/anthropic.claude-haiku-4-5-20251001-v1:0 — not a cross-region inference profile.

Workaround: Setting ANTHROPIC_DEFAULT_HAIKU_MODEL='us.anthropic.claude-haiku-4-5-20251001-v1:0' fixes it.

Bug 2: Retries on non-transient 403 for 3+ minutes

A 403 "explicit deny in a service control policy" is not a transient error, but Claude Code retries it up to 11 times with backoff across multiple concurrent retry chains. The debug log shows 6+ retries over ~20 seconds before the user cancelled, and there were multiple parallel request streams all independently retrying. The session hung for over 3 minutes before the user force-quit.

Claude Code should fail fast on permission-denied / SCP-denied 403s rather than retrying.

Steps to reproduce

  1. Configure Bedrock with cross-region inference profiles (e.g. us.anthropic.* models)
  2. Set CLAUDE_CODE_USE_BEDROCK=1 without setting ANTHROPIC_DEFAULT_HAIKU_MODEL
  3. Start Claude Code — main model (Opus/Sonnet) works fine
  4. Trigger a tool call (e.g. ask it to run a curl command)
  5. The Haiku risk-assessment call fails with 403 and retries indefinitely

Expected behavior

  1. The default Haiku model ID on Bedrock should use the us. cross-region prefix, consistent with how the main model ID is resolved
  2. Hard 403 errors (SCP denials) should not be retried
  3. It should not completely hang for 3-5 minutes before proceeding to ask the user if the tool call is ok

Debug log

Debug session ID: 97e5d18e-2979-48d8-9bd2-c137717a676a

View original on GitHub ↗

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