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
* feat(anthropic): migrate 1M context from beta to GA
Anthropic has graduated the 1M context window from beta to GA.
This commit:
- Stops injecting the context-1m-2025-08-07 beta header when
context1m: true is configured
- Removes the OAuth token skip logic that was needed because
Anthropic previously rejected the context-1m beta with OAuth auth
(OAuth now supports 1M natively)
- Strips the legacy beta header from user-configured anthropicBeta
arrays to prevent sending a stale header
- Removes the now-unused isAnthropic1MModel helper,
ANTHROPIC_1M_MODEL_PREFIXES constant, and logger import from
the stream wrappers
The context1m config param continues to be respected for context
window sizing in context.ts — only the beta header injection is
removed.
Closes#45550 (Phase 1)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(anthropic): migrate 1M context handling to GA
* fix(clownfish): address review for ghcrawl-156721-autonomous-smoke (1)
* fix(anthropic): restrict ga 1m context models
* docs(anthropic): align ga 1m context guidance
* fix(anthropic): normalize ga 1m model metadata
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,7 @@ Docs: https://docs.openclaw.ai
55
55
56
56
- CLI/tasks: reject partially numeric `openclaw tasks audit --limit` values so audit limits must be real positive integers instead of accepting strings like `5abc`. (#84901) Thanks @jbetala7.
57
57
- Status/diagnostics: bound deep Docker audit probes so `openclaw status --deep` reports slow container checks instead of hanging behind unbounded inspection. (#85476) Thanks @giodl73-repo.
58
+
- Providers/Anthropic: migrate 1M context handling to GA-capable Claude 4.x models by sizing eligible models at 1M without the retired `context-1m-2025-08-07` beta, ignoring that retired beta in older configs, and preserving OAuth-required Anthropic beta headers. (#45613) Thanks @haoyu-haoyu.
58
59
- Twitch: keep stale message-handler cleanup callbacks from removing newer handler registrations for the same account, preserving inbound message delivery after reconnects. Fixes #83888. (#85425) Thanks @alkor2000.
59
60
- Memory/LanceDB: expose public memory artifacts through the active memory provider bridge so memory-wiki imports durable memory files, daily notes, dream reports, and event logs without depending on memory-core internals. Fixes #83604. (#85060) Thanks @brokemac79.
60
61
- Docker setup: stop printing the Gateway bearer token in setup logs and printed follow-up commands.
Anthropic's 1M context window is beta-gated. Enable it per model:
270
+
<Accordiontitle="1M context window">
271
+
Anthropic's 1M context window is available on GA-capable Claude 4.x models
272
+
such as Opus 4.6, Opus 4.7, and Sonnet 4.6. OpenClaw sizes those models at
273
+
1M automatically:
272
274
273
275
```json5
274
276
{
275
277
agents: {
276
278
defaults: {
277
279
models: {
278
-
"anthropic/claude-opus-4-6": {
279
-
params: { context1m: true },
280
-
},
280
+
"anthropic/claude-opus-4-6": {},
281
281
},
282
282
},
283
283
},
284
284
}
285
285
```
286
286
287
-
OpenClaw maps this to `anthropic-beta: context-1m-2025-08-07` on requests.
287
+
Older configs can keep `params.context1m: true`, but OpenClaw no longer sends
288
+
the retired `context-1m-2025-08-07` beta header. Older `anthropicBeta` config
289
+
entries with that value are ignored during request header resolution and
290
+
unsupported older Claude models stay on their normal context window.
288
291
289
292
`params.context1m: true` also applies to the Claude CLI backend
290
-
(`claude-cli/*`) for eligible Opus and Sonnet models, expanding the runtime
291
-
context window for those CLI sessions to match the direct-API behavior.
293
+
(`claude-cli/*`) for eligible GA-capable Opus and Sonnet models, preserving
294
+
the runtime context window for those CLI sessions to match the direct-API
295
+
behavior.
292
296
293
297
<Warning>
294
-
Requires long-context access on your Anthropic credential. Legacy token auth (`sk-ant-oat-*`) is rejected for 1M context requests — OpenClaw logs a warning and falls back to the standard context window.
298
+
Requires long-context access on your Anthropic credential. OAuth/subscription token auth keeps its required Anthropic beta headers, but OpenClaw strips the retired 1M beta header if it remains in older config.
295
299
</Warning>
296
300
297
301
</Accordion>
298
302
299
303
<Accordiontitle="Claude Opus 4.7 1M context">
300
-
`anthropic/claude-opus-4.7` and its `claude-cli` variant have a 1M context
304
+
`anthropic/claude-opus-4-7` and its `claude-cli` variant have a 1M context
301
305
window by default — no `params.context1m: true` needed.
0 commit comments