Problem
The 1M context window (beta) section's warning only mentions "Legacy token auth (sk-ant-oat-*)" as unsupported, but the actual OpenClaw runtime rejects the context-1m beta header for all non-API-key auth, including Claude CLI. The runtime log reads:
ignoring context1m for Anthropic Claude CLI or legacy token auth
This can mislead Claude CLI users into thinking context1m: true will work for them when it silently falls back to standard context.
Suggested changes
1. Update the warning to lead with the API key requirement:
Current:
Requires long-context access on your Anthropic credential. Legacy token auth (`sk-ant-oat-*`) is rejected for 1M context requests...
Suggested:
Requires an Anthropic API key. Claude CLI auth and OAuth/subscription tokens (`sk-ant-oat-*`) do not support 1M context. OpenClaw silently falls back to the standard context window and logs a warning. If you are using Claude CLI as your auth method, this param has no effect.
2. Add a line listing supported models:
Supported models: `anthropic/claude-opus-4-6` and `anthropic/claude-sonnet-4-6`.
The code accepts both via isAnthropic1MModel(), but the current example only shows Opus.
3. Branch with fix available:
A branch with these changes is at jtil4201:fix/anthropic-1m-context-docs if you'd prefer to pull directly.
Problem
The 1M context window (beta) section's warning only mentions "Legacy token auth (
sk-ant-oat-*)" as unsupported, but the actual OpenClaw runtime rejects thecontext-1mbeta header for all non-API-key auth, including Claude CLI. The runtime log reads:This can mislead Claude CLI users into thinking
context1m: truewill work for them when it silently falls back to standard context.Suggested changes
1. Update the warning to lead with the API key requirement:
Current:
Suggested:
2. Add a line listing supported models:
The code accepts both via
isAnthropic1MModel(), but the current example only shows Opus.3. Branch with fix available:
A branch with these changes is at
jtil4201:fix/anthropic-1m-context-docsif you'd prefer to pull directly.