{"name":"CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS","slug":"claude-code-gateway-model-discovery-timeout-ms","family":"env","title":"Environment variables","noun":"environment variable","description":"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: `3000`). Raise it when your gateway needs longer than three seconds to answer `\/v1\/models` at startup. Takes plain digits only; `0`, negative values, and other spellings keep the default. Requires Claude Code v2.1.269 or later","description_source":"docs","described_by":{"doc":"claude-code\/env-vars","title":"Environment variables"},"presence":{"first_seen":"2.1.269","removed_in":null,"in_current_build":true,"newest_mined":"2.1.322","builds":49,"mined_builds":161,"first_cited":{"version":"2.1.269","released_at":"2026-09-11 18:12:49","spans":1}},"aliases":[],"entries":[{"version":"2.1.269","anchor":"gateway-model-discovery-request-timeout-is-now-configurable","heading":"Gateway model-discovery request timeout is now configurable via env var","line":"New `CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS` env var configures the LLM gateway's model-discovery timeout","released_at":"2026-09-11 18:12:49","reason":"found in this entry's text, named in this entry"}],"entries_total":1,"docs":[{"source":"claude-code","path":"env-vars","title":"Environment variables","documented":true},{"source":"claude-code","path":"llm-gateway-protocol","title":"Claude Code gateway compatibility guide","documented":false}],"docs_total":2,"gates":[],"related":[{"name":"CLAUDE_CODE_GATEWAY_HINT_HEADERS","slug":"claude-code-gateway-hint-headers","description":"Set to `1` to send the [gateway hint headers](\/docs\/en\/llm-gateway-protocol#gateway-hint-headers), such as `x-claude-code-request-class` and `x-claude-code-compaction`, on a custom proxy or a third-party provider such as Amazon Bedrock or Claude Platform on AWS. Set to `0` to stop sending them on every connection, including a direct connection to the Anthropic API, where Claude Code sends them by default. Requires Claude Code v2.1.273 or later"},{"name":"CLAUDE_CODE_GATEWAY_TOKEN_FILE_DESCRIPTOR","slug":"claude-code-gateway-token-file-descriptor","description":"Auth tokens can now be handed to subprocesses over file descriptors instead of plaintext environment variables."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claude-code-gateway-model-discovery-timeout-ms","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}