forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Description
After adding context-1m-2025-08-07 and adaptive-thinking-2026-01-28 beta headers (PR #152), Opus models still fail at ~200k tokens. The 1M context window is NOT working.
The body.permission: property 'body.permission' is unsupported warning also appears but is cosmetic - not the real problem.
Real Problem
Opus cannot exceed 200k token context despite the 1M header being set.
Possible Causes
- Compaction bug (from upstream 1M tokens for Opus 4.6 anomalyco/opencode#12338): Token counting includes output/thinking tokens, triggering compaction too early
- Model context limit: Models snapshot may have 200k hardcoded for Opus
- Header only works for Sonnet: Upstream originally only applied context-1m for Sonnet models
- SDK limitation:
@ai-sdk/anthropic@2.0.58may not support 1M context
Related
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels