feat(agents): support Anthropic 1M context beta header

This commit is contained in:
Peter Steinberger
2026-02-18 03:28:56 +01:00
parent d1c00dbb7c
commit c90b09cb02
5 changed files with 238 additions and 0 deletions

View File

@@ -108,6 +108,23 @@ agents:
every: "55m"
```
### Example: enable Anthropic 1M context beta header
Anthropic's 1M context window is currently beta-gated. OpenClaw can inject the
required `anthropic-beta` value when you enable `context1m` on supported Opus
or Sonnet models.
```yaml
agents:
defaults:
models:
"anthropic/claude-opus-4-6":
params:
context1m: true
```
This maps to Anthropic's `context-1m-2025-08-07` beta header.
## Tips for reducing token pressure
- Use `/compact` to summarize long sessions.