Skip to content

feat(anthropic): migrate 1M context from beta to GA#650

Open
BingqingLyu wants to merge 4 commits intomainfrom
fork-pr-45592-feat-anthropic-1m-ga-v2
Open

feat(anthropic): migrate 1M context from beta to GA#650
BingqingLyu wants to merge 4 commits intomainfrom
fork-pr-45592-feat-anthropic-1m-ga-v2

Conversation

@BingqingLyu
Copy link
Copy Markdown
Owner

@BingqingLyu BingqingLyu commented Apr 27, 2026

Closes openclaw#45550

Summary

Anthropic has officially moved the 1M context window from Beta to GA (General Availability). This PR aligns OpenClaw with the new API behavior.

Changes

  • Remove context-1m-2025-08-07 beta header injection (no longer required)
  • Simplify OAuth token skip logic for 1M beta (no longer needed)
  • Keep context1m: true param for backward compatibility

Backward Compatibility

  • Existing configs with context1m: true continue to work
  • Anthropic API ignores unrecognized beta headers (no-op), so removing the header is safe
  • No breaking changes for users

Phase 2 Strategy (Future)

As discussed in openclaw#45550, we will keep context1m: true as an explicit opt-in even after this PR. Default-enabling 1M context could surprise cost-sensitive users due to increased token consumption.

Testing

  • Unit tests updated
  • Integration tests pass
  • Manual verification with Opus 4.6

Related

JonathanJing and others added 4 commits March 13, 2026 18:22
Anthropic has officially moved the 1M context window from Beta to GA
(General Availability). This change aligns OpenClaw with the new API behavior:

- Remove context-1m-2025-08-07 beta header injection
- Remove OAuth token skip logic for 1M beta (no longer needed)
- Keep context1m param for backward compatibility

Closes openclaw#45550
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(anthropic): migrate 1M context from beta to GA

2 participants