What probably matters to youSection of the release
What
When Claude Code queries an LLM gateway's /v1/models endpoint to discover available models, it waits for a response before giving up. That wait time was previously fixed in code; it can now be set with the CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS environment variable, and still defaults to 3000ms (3 seconds) if unset. The failure log also now says explicitly when the request failed because of a timeout, rather than a generic failure.
Why
Users running a slower or more distant LLM gateway can extend the timeout instead of hitting a discovery failure at the fixed default, and the clearer log message makes timeout-related discovery failures easier to diagnose.
CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MSClaude Code changelogmodified, high confidence* Added `CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS` to extend the LLM gateway `/v1/models` discovery timeout (default 3s)see the edit
Since it was published
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Added sinceA small documentation edit on Claude Code gateway compatibility guide touched a line naming CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS after this was published.To give a slow gateway longer, set [`CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS`](/docs/en/env-vars#variables). The variable requires Claude Code v2.1.269 or later.llm-gateway-protocolsee the edit
Confirmed sinceAnthropic's documentation has since written up CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS, on Environment variables.| `CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS` | Timeout in milliseconds for the [gateway model discovery](/docs/en/llm-gateway-protocol#model-discovery) request that `CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY` turns on (default: `300…env-varssee the edit
How sure we are
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agreesCLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS on Claude Code changelog
Anthropic's release notes agreeAdded CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS to extend the LLM gateway /v1/models discovery timeout (default 3s)
The name it cites is new in this buildNew in this build: CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS