Claude Code v2.1.266 Fixes a Regression That Broke LLM Gateway Setups
Hey, it's me, Shiichan! Today's a small but important fix from Claude Code.
Claude Code ReleaseWhat was announced?
Claude Code Release announced version v2.1.266. This isn't a new feature — it's a fix for a regression that shipped in the previous version, v2.1.265.
The story so far
In v2.1.265, the undocumented CLAUDE_CODE_USE_GATEWAY environment variable started behaving differently. It used to be ignored unless both ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN were set, but in v2.1.265 it began forcing Cloud gateway sign-in on its own. That broke every request with a "Not signed in to the Cloud gateway" error for anyone running LLM-gateway or proxy setups that set this variable alongside an API key, an apiKeyHelper, or custom auth headers.
What changes
In v2.1.266, CLAUDE_CODE_USE_GATEWAY on its own goes back to being ignored, just like before. No configuration changes are needed — updating is enough to fix it.
Wrap-up
- Claude Code v2.1.266 fixes a regression introduced in v2.1.265
- The bug broke every request for LLM-gateway/proxy setups combining CLAUDE_CODE_USE_GATEWAY with an API key or custom auth
- v2.1.266 restores the original behavior — the variable alone is ignored again
- No configuration changes needed, just update
- Worth updating if you run Claude Code through your own LLM gateway or proxy