Summary
Anthropic has officially moved the 1M context window from Beta to GA (General Availability). This issue tracks the migration to align OpenClaw with the new Anthropic API behavior.
Background
Per Anthropic's announcement (https://www.cnbeta.com.tw/articles/tech/1553412.htm), the following changes are now in effect:
- No beta header required - The context-1m-2025-08-07 header is no longer needed
- Rate limits unified - 1M requests now share the same rate limits as standard requests
- OAuth support - OAuth tokens (sk-ant-oat-*) now support 1M context (previously rejected)
- Media quota increased - Images/PDFs per request increased from 100 to 600
Current Behavior
OpenClaw currently requires explicit opt-in via params.context1m: true:
{
agents: {
defaults: {
models: {
"anthropic/claude-opus-4-6": {
params: { context1m: true }
}
}
}
}
}
This injects anthropic-beta: context-1m-2025-08-07 and automatically skips the beta header for OAuth tokens.
Proposed Changes (Minimal/Backward-Compatible)
Phase 1: Remove Beta Header (This Issue)
Phase 2: Default Enable (Future Consideration)
- Consider defaulting Opus/Sonnet 4.6+ to 1M context without explicit config
Affected Files
| File |
Change |
| src/agents/pi-embedded-runner/anthropic-stream-wrappers.ts |
Remove beta header injection logic |
| src/agents/pi-embedded-runner/anthropic-stream-wrappers.ts |
Simplify OAuth skip logic |
| docs/providers/anthropic.md |
Update 1M context documentation |
| src/agents/pi-embedded-runner-extraparams.test.ts |
Update test assertions |
Backward Compatibility
Fully backward compatible - Existing context1m: true configurations will continue to work, just without sending the unnecessary beta header.
Related
Summary
Anthropic has officially moved the 1M context window from Beta to GA (General Availability). This issue tracks the migration to align OpenClaw with the new Anthropic API behavior.
Background
Per Anthropic's announcement (https://www.cnbeta.com.tw/articles/tech/1553412.htm), the following changes are now in effect:
Current Behavior
OpenClaw currently requires explicit opt-in via params.context1m: true:
This injects anthropic-beta: context-1m-2025-08-07 and automatically skips the beta header for OAuth tokens.
Proposed Changes (Minimal/Backward-Compatible)
Phase 1: Remove Beta Header (This Issue)
Phase 2: Default Enable (Future Consideration)
Affected Files
Backward Compatibility
Fully backward compatible - Existing context1m: true configurations will continue to work, just without sending the unnecessary beta header.
Related