What it is
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
Anthropic's own wording. Read off Environment variables, captured 2026-09-22.
Presence across releases
1Build by build
6One 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
0No release's published evidence quotes this name. The ledger indexes the Evidence lines of every changelog on this site, so this says nobody here has ever quoted it; it says nothing about how old the name is.
Names beside it
Every environment variable in the inventory starting claude_code_gateway, up to twelve of them.
CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MSTimeout 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 v2.1.269
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.