Claude Code uses the 1M context window behind a custom ANTHROPIC_BASE_URL
From Claude Code 2.1.285, sessions behind a custom ANTHROPIC_BASE_URL use the 1M context window on models that have one. A gateway that stops at 200K tokens will fail on long sessions unless you run /autocompact 200k.
What does this mean for me?
Action needed
Engineering leadership
Cost, risk, timeline, team impact Action neededIf your teams route Claude Code through an internal LLM gateway, long sessions can now send requests above 200K tokens. Check that the gateway and its billing can handle 1M-token requests, or have teams set /autocompact 200k.
Engineer
What to change, what breaks, what to test Action neededWith ANTHROPIC_BASE_URL set, Claude Code 2.1.285 now uses the 1M context window on Opus 4.7+, Sonnet 5+ and Fable. If your gateway rejects requests over 200K tokens, run /autocompact 200k.
General consumer
Using the Claude apps, not the API No impactNothing to do. This only affects Claude Code set up to use a custom gateway, not the Claude apps.
Claude Code 2.1.285 changes sessions that run behind a custom ANTHROPIC_BASE_URL, such as an LLM gateway or proxy, to use the 1M token context window of models that have one. The changelog names Opus 4.7 and later, Sonnet 5 and later, and Fable.
Previously these sessions compacted at the smaller window. Now a long session can send requests larger than 200K tokens through the gateway. A gateway or upstream that stops at 200K will start rejecting those requests. The changelog’s fix is to run /autocompact 200k, which restores compaction at 200K.
The model list on this entry maps the changelog’s family names to API IDs and should be checked. The changelog carries no dates. 2.1.285 was absent when the changelog was fetched on 28 September at 19:14 UTC and present on 29 September, so the date is inferred from that window.
Topics: Coding tools
Terms on this page: Context window