Opus 4.6 on Bedrock excluded from 1M context window
Resolved 💬 3 comments Opened Mar 17, 2026 by bd-david-bostick Closed Mar 21, 2026
Description
Claude Code CLI v2.1.77 does not enable the 1M context window for Opus 4.6 when running on AWS Bedrock, even though:
- The v2.1.75 changelog states 1M context is available for Opus 4.6
- The general eligibility function (
onq()) recognizesopus-4-6as 1M-eligible - The
CLAUDE_CODE_EXTRA_BODYenv var correctly passes theanthropic_beta: ["context-1m-2025-08-07"]header
Root Cause (from binary analysis)
The CLI's context window resolver (oY()) has 4 code paths:
[1m]in model ID → 1M- Provider
max_input_tokensmetadata → use value - Beta header
context-1m-2025-08-07+ eligible model → 1M - Fallback → 200K
On Bedrock, a separate function (Liq()) handles eligibility and grants 1M only to Sonnet 4.6, not Opus. This overrides the general eligibility check. Additionally, Bedrock's list-foundation-models metadata lacks max_input_tokens, so path 2 falls through, and no [1m] model variant exists on Bedrock, so path 1 doesn't apply either.
Steps to Reproduce
- Configure Claude Code CLI to use Opus 4.6 on Bedrock (
us.anthropic.claude-opus-4-6-v1) - Set
CLAUDE_CODE_EXTRA_BODY='{"anthropic_beta":["context-1m-2025-08-07"]}' - Restart CLI
- Run
/context— shows 200K limit
Expected Behavior
/context should report ~1M token limit for Opus 4.6 on Bedrock, matching the behavior for Sonnet 4.6 on Bedrock and Opus 4.6 on the Anthropic API.
Environment
- CLI version: 2.1.77
- Model:
us.anthropic.claude-opus-4-6-v1(Bedrock cross-region inference profile) - Provider: AWS Bedrock
- Platform: macOS (Darwin, arm64)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗