Providers: skip context1m beta for Anthropic OAuth tokens (#24620)

* Providers: skip context1m beta for Anthropic OAuth tokens

* Tests: cover OAuth context1m beta skip behavior

* Docs: note context1m OAuth incompatibility

* Agents: add context1m-aware context token resolver

* Agents: cover context1m context-token resolver

* Commands: apply context1m-aware context tokens in session store

* Commands: apply context1m-aware context tokens in status summary

* Status: resolve context tokens with context1m model params

* Status: test context1m status context display
This commit is contained in:
Vincent Koc
2026-02-23 12:29:09 -05:00
committed by GitHub
parent 28377e1b7a
commit f03ff39754
11 changed files with 248 additions and 23 deletions

View File

@@ -101,6 +101,10 @@ with `params.context1m: true` for supported Opus/Sonnet models.
OpenClaw maps this to `anthropic-beta: context-1m-2025-08-07` on Anthropic
requests.
Note: Anthropic currently rejects `context-1m-*` beta requests when using
OAuth/subscription tokens (`sk-ant-oat-*`). OpenClaw automatically skips the
context1m beta header for OAuth auth and keeps the required OAuth betas.
## Option B: Claude setup-token
**Best for:** using your Claude subscription.