{"name":"CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY","slug":"claude-code-enable-gateway-model-discovery","family":"env","title":"Environment variables","noun":"environment variable","description":"Set to `1` to populate the `\/model` picker from your gateway's `\/v1\/models` endpoint when `ANTHROPIC_BASE_URL` points at an Anthropic-compatible gateway such as LiteLLM, Kong, or an internal proxy. Off by default because gateways backed by a shared API key would otherwise show every user every model the key can access. Discovered models are still filtered by an [`availableModels`](\/docs\/en\/settings-reference#availablemodels) allowlist the session receives; deliver the list through [MDM or a managed settings file](\/docs\/en\/managed-settings#delivery-mechanisms), since [server-managed delivery is not available on gateway configurations](\/docs\/en\/server-managed-settings#platform-availability)","description_source":"docs","described_by":{"doc":"claude-code\/env-vars","title":"Environment variables"},"presence":{"first_seen":"2.1.138","removed_in":null,"in_current_build":true,"newest_mined":"2.1.308","builds":149,"mined_builds":149,"first_cited":null},"aliases":[],"entries":[{"version":"2.1.304","anchor":"gateway-bootstrap-response-now-carries-oauthbearersha256-and","heading":"Gateway model discovery records more about its startup replies","line":"Startup replies used by gateway model discovery now carry two more details, and a reply for skipped discovery is fixed","released_at":"2026-10-19 19:47:15","reason":"found in this entry's text, named in this entry"},{"version":"2.1.295","anchor":"gateway-discovery-skip-message-and-base-url-assertion","heading":"Gateway model discovery skip message no longer names one variable","line":"When gateway model discovery is skipped, the message now says the base URL is asserted to be the Anthropic API rather than naming a variable","released_at":"2026-10-08 18:22:58","reason":"found in this entry's text, named in this entry"},{"version":"2.1.248","anchor":"gateway-model-discovery-explains-why-it-skipped-and-can-use-","heading":"Gateway model discovery explains why it skipped, and can use apiKeyHelper","line":"Gateway model discovery can authenticate with apiKeyHelper and logs why it skipped.","released_at":"2026-08-27 20:35:36","reason":"named in this entry, found in this entry's text"}],"entries_total":3,"docs":[{"source":"claude-code","path":"env-vars","title":"Environment variables","documented":true},{"source":"claude-code","path":"llm-gateway-connect","title":"Connect Claude Code to an LLM gateway","documented":false},{"source":"claude-code","path":"llm-gateway-protocol","title":"Claude Code gateway compatibility guide","documented":false},{"source":"claude-code","path":"llm-gateway-rollout","title":"Roll out an LLM gateway for your organization","documented":false},{"source":"claude-code","path":"model-config","title":"Model configuration","documented":false},{"source":"claude-code","path":"whats-new\/2026-w18","title":"Week 18 \u00b7 April 27 \u2013 May 1, 2026","documented":false}],"docs_total":6,"gates":[],"related":[{"name":"CLAUDE_CODE_ENABLE_APPEND_SUBAGENT_PROMPT","slug":"claude-code-enable-append-subagent-prompt","description":"Gates the extra subagent system prompt: when this is truthy and a prompt was supplied by the hidden `--append-subagent-system-prompt` option, its file variant, or the SDK's `appendSubagentSystemPrompt` initialize field, the text is appended to a Task-tool subagent's system prompt (skipped for agents with an isolated context and in one other case). Claude Code sets it to `1` itself when either command-line option supplies a prompt."},{"name":"CLAUDE_CODE_ENABLE_AUTO_MODE","slug":"claude-code-enable-auto-mode","description":"Accepted for compatibility with older releases and has no effect. Auto mode is available by default on every provider, including Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](\/docs\/en\/claude-apps-gateway) sessions. In v2.1.158 through v2.1.206, setting this to `1` was required to make [auto mode](\/docs\/en\/permission-modes#eliminate-prompts-with-auto-mode) available on those providers"},{"name":"CLAUDE_CODE_ENABLE_AWAY_SUMMARY","slug":"claude-code-enable-away-summary","description":"Override [session recap](\/docs\/en\/interactive-mode#session-recap) availability. Set to `0` to force recaps off regardless of the `\/config` toggle. Set to `1` to force recaps on when [`awaySummaryEnabled`](\/docs\/en\/settings-reference#awaysummaryenabled) is `false`. Takes precedence over the setting and `\/config` toggle"},{"name":"CLAUDE_CODE_ENABLE_BACKGROUND_PLUGIN_REFRESH","slug":"claude-code-enable-background-plugin-refresh","description":"Set to `1` to refresh plugin state at turn boundaries in [non-interactive mode](\/docs\/en\/headless) after a background install completes. Off by default because the refresh changes the system prompt mid-session, which invalidates [prompt caching](\/docs\/en\/prompt-caching) for that turn"},{"name":"CLAUDE_CODE_ENABLE_CFC","slug":"claude-code-enable-cfc","description":"Restricted sessions skip Claude in Chrome browser wiring, same as safe mode."},{"name":"CLAUDE_CODE_ENABLE_DESIGN_MCP","slug":"claude-code-enable-design-mcp","description":"Forces the built-in Claude Design MCP server on (`1`, `true`, `yes`, `on`) or off (`0`, `false`, `no`, `off`); unset or any other value falls back to the `tengu_omelette_whisk` flag, default off. When on and the API provider is first-party, Claude Code adds an HTTP MCP server named `claude_design` at `https:\/\/api.anthropic.com\/v1\/design\/mcp` to its built-in servers, and it also enables the `\/design` command, which another condition can enable as well."},{"name":"CLAUDE_CODE_ENABLE_DESIGN_SYNC","slug":"claude-code-enable-design-sync","description":null},{"name":"CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL","slug":"claude-code-enable-experimental-advisor-tool","description":"The experimental advisor override no longer skips per-model eligibility checks, only the rank requirement."},{"name":"CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL","slug":"claude-code-enable-feedback-survey-for-otel","description":"Set to `1` to route the \"How is Claude doing?\" session quality survey to your own [OpenTelemetry collector](\/docs\/en\/monitoring-usage) when Anthropic-bound nonessential traffic is blocked. Survey ratings are emitted only as OTEL events to your configured collector. No survey data is sent to Anthropic in this mode. Applies when `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, `DISABLE_TELEMETRY`, or `DO_NOT_TRACK` is set, and has no effect otherwise. `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY` and the organization product feedback policy take precedence"},{"name":"CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING","slug":"claude-code-enable-fine-grained-tool-streaming","description":"Controls whether tool call inputs stream from the API as Claude generates them. With this off, a large tool input such as a long file write arrives only after Claude finishes generating it, which can look like it's hanging. Enabled by default on the Anthropic API. On Amazon Bedrock and Google Cloud's Agent Platform, enabled per model where the deployed container supports it. Set to `0` to opt out. Set to `1` to force on when routing through a proxy via `ANTHROPIC_BASE_URL`, `ANTHROPIC_VERTEX_BASE_URL`, or `ANTHROPIC_BEDROCK_BASE_URL`. Off by default on Microsoft Foundry and [gateway](\/docs\/en\/llm-gateway) connections"}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claude-code-enable-gateway-model-discovery","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}