Sweep 19 Sep 2026 · 02:36Z Build v2.1.278 500 read Stable v2.1.267 Latest v2.1.278 Next v2.1.278 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.269 ·

Gateway model-discovery request timeout is now configurable via env var

New CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS env var configures the LLM gateway's model-discovery timeout

TierUse it nowhow much it should matter to you
Useful4my rating, 1 to 5
Signal2worth watching, 1 to 5
AreaGatewaywhat it touches
KindImprovementsin v2.1.269,
Use it now Notable

New CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS env var configures the LLM gateway's model-discovery timeout

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.

Read from
Names in the bundleCLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS
What the documentation says
CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS Claude Code changelog modified, 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 since A 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-protocol see the edit
Confirmed since Anthropic'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-vars see 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

See this entry in the whole of v2.1.269 →