You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(zen): 1M context window beta not sent for Opus 4.6 and Sonnet 4.5 #12452
The context-1m-2025-08-07 beta header is only applied to models matching claude-sonnet-*. Opus 4.6 and Sonnet 4.5 silently fall back to the default context limit despite supporting 1M tokens.
Affects both the direct Anthropic API path (anthropic-beta header) and Bedrock path (anthropic_beta body field).
Activity
github-actions commentedon Feb 6, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
nabilfreeman commentedon Mar 23, 2026
@ruslan-kurchenko
✅ Confirmed Working Solution for Sonnet 4.5 on Amazon Bedrock
Successfully enabled 1M context for Claude Sonnet 4.5 on Amazon Bedrock using a config-only approach. No plugins needed.
Configuration
Add this to your
opencode.json:{ "provider": { "amazon-bedrock": { "models": { "global.anthropic.claude-sonnet-4-5-20250929-v1:0": { "limit": { "context": 1000000, "output": 64000 }, "options": { "anthropicBeta": ["context-1m-2025-08-07"] } } } } } }Key Points
anthropicBetaoption: Gets translated toadditionalModelRequestFields.anthropic_betain the Bedrock Converse API (not an HTTP header)limit.context: 1000000: Tells OpenCode about the 1M capacity, preventing premature auto-compaction (~968K instead of ~168K)Tested & Working
global.anthropic.*)Hope this helps! 🎉