BUGFIX
Custom gateway connection fixed, undocumented variable no longer falsely blocks requests
If you connect to Claude through a proxy server, all your requests may have failed in version 2.1.265. This was caused by a regression with the undocumented environment variable CLAUDE_CODE_USE_GATEWAY. Previously, it was ignored unless both ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN were set; however, the previous version forced Cloud gateway sign-in on its own, causing every request to fail when paired with a standard API key, apiKeyHelper, or custom auth headers. Version 2.1.266 has now fixed this so the variable is ignored again when set alone, allowing normal use without changing any settings.
# In 2.1.265, setting this undocumented environment variable alone forced Cloud gateway sign-in:
export CLAUDE_CODE_USE_GATEWAY=true
# Previously and now: the variable is ignored unless both of the following are set:
export ANTHROPIC_BASE_URL="https://gateway.example.com"
export ANTHROPIC_AUTH_TOKEN="your-token"
# When paired with any of the following authentication methods, the previous version errored on every request:
# 1. API key
# 2. apiKeyHelper
# 3. Custom auth headers
# Error: Not signed in to the Cloud gateway