[BUG][bedrock] Opus 4.6 [1m] selection writes invalid model id → 400 "The provided model identifier is invalid"

Resolved 💬 7 comments Opened Feb 5, 2026 by IsaacZhangg Closed Apr 26, 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 CLI against AWS Bedrock, selecting the 1M context variant of Claude Opus 4.6 ([1m]) causes requests to fail with:

  • 400 The provided model identifier is invalid.

This looks like a model-ID handling bug specific to the [1m] suffix on Bedrock. After selecting the [1m] option via /model, the CLI appears to persist a non–Bedrock-qualified identifier in settings.json, e.g.:

  • Observed in settings.json: claude-opus-4-6-v1[1m]
  • Expected for Bedrock: us.anthropic.claude-opus-4-6-v1[1m]

As a result, Bedrock rejects the request even though the 1M context variant should be reachable when the correct model ID (and any required headers) are used.

What Should Happen?

Claude Code CLI should preserve the fully-qualified Bedrock model ID and successfully execute requests when the [1m] variant is selected, i.e. use:

  • us.anthropic.claude-opus-4-6-v1[1m]

The call should succeed, and the 1M context option should be active / reported correctly.

Error Messages/Logs

API Error (claude-opus-4-6[1m]): 400 The provided model identifier is invalid.

Steps to Reproduce

  1. Ensure AWS credentials are configured and the us-east-1 region is selected.
  2. Configure/run Claude Code using the model ID with the [1m] suffix, for example:
  • export ANTHROPIC_MODEL="claude-opus-4-6[1m]"
  • Or in Claude Code CLI, set the model via /model and select the option that uses the [1m] suffix.
  1. Run any command that initiates an API call (e.g., ask a question).

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.32 (Claude Code)

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

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