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

Status Fixed / completed
Reported on v2.1.32
Maintainer reply ✓ Yes — mhegazy
Activity 7 comments · opened Feb 5, 2026 · closed Apr 26, 2026
💡 Likely answer: A maintainer (mhegazy, contributor) responded on this thread — see the highlighted reply below.

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 ↗

7 Comments

djaym7 · 6 months ago

+1

nikzart · 6 months ago

+1

nakedible · 6 months ago

This is a real bug, confirmed.

The workaround is to say /model us.anthropic.claude-opus-4-6-v1[1m], which works. This also works for the eu inference profile.

ijin · 6 months ago

Still an issue.

amer313 · 6 months ago

+1

mhegazy contributor · 4 months ago

should be fixed in v2.1.45+

github-actions[bot] · 3 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.