What it is
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
Anthropic's own wording. Read off Environment variables, captured 2026-09-23.
Presence across releases
1Build by build
11One row per release since the first build this name was read out of. Absent means the build was read and the name was not in it, never mined means no bundle for that release was ever archived, and a declared type or a default is only ever what that release's own bundle stated.
First cited
1The earliest release whose published evidence quoted CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS was v2.1.269, 11 Sep 2026. That is the oldest release this project wrote about it, so it is a floor on the name's age and not the release that introduced it. It is not a presence reading: which builds carried the name is the table above.
Names beside it
Every environment variable in the inventory starting claude_code_gateway, up to twelve of them.
CLAUDE_CODE_GATEWAY_HINT_HEADERSSet 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 v2.1.273
CLAUDE_CODE_GATEWAY_TOKEN_FILE_DESCRIPTORAuth tokens can now be handed to subprocesses over file descriptors instead of plaintext environment variables. v2.1.257
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the environment variable does. All environment variables.