{"name":"ANTHROPIC_MODEL","slug":"anthropic-model","family":"env","title":"Environment variables","noun":"environment variable","description":"Name of the model setting to use (see [Model Configuration](\/docs\/en\/model-config#environment-variables))","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.309","builds":150,"mined_builds":150,"first_cited":{"version":"2.1.236","released_at":"2026-08-19 18:45:14","spans":3}},"aliases":[],"entries":[{"version":"2.1.284","anchor":"gateway-config-validation-warns-about-empty-or-default-less","heading":"Gateway config checks warn about model lists that would reject every request","line":"Gateway checks now warn when availableModels is empty or leaves out the default model, both of which get requests refused","released_at":"2026-09-28 17:11:59","reason":"found in this entry's text"},{"version":"2.1.259","anchor":"settings-can-now-supply-a-default-model-ahead-of-anthropic","heading":"Settings can now supply a default model, ahead of ANTHROPIC_DEFAULT_MODEL","line":"A model set in settings.json now takes precedence over the ANTHROPIC_DEFAULT_MODEL environment variable at startup.","released_at":"2026-09-02 21:21:42","reason":"found in this entry's text, named in this entry"},{"version":"2.1.236","anchor":"anthropic-default-model-sets-the-model-when-nothing-else-doe","heading":"ANTHROPIC_DEFAULT_MODEL sets the model when nothing else does","line":"Set ANTHROPIC_DEFAULT_MODEL and it becomes your model whenever no flag or ANTHROPIC_MODEL applies.","released_at":"2026-08-19 18:45:14","reason":"named in this entry, found in this entry's text"},{"version":"2.1.117","anchor":"model-source-indicator-in-status","heading":"Model Source Indicator in Status","line":null,"released_at":"2026-04-21 21:54:08","reason":"found in this entry's text"},{"version":"1.0.111","anchor":"environment-variable-whitelist","heading":"Environment Variable Whitelist","line":null,"released_at":"2025-09-10 22:16:23","reason":"found in this entry's text"},{"version":"0.2.101","anchor":"new-features","heading":"New Features","line":null,"released_at":"2025-05-05 15:24:19","reason":"found in this entry's text"},{"version":"0.2.98","anchor":"dynamic-model-configuration","heading":"Dynamic Model Configuration","line":null,"released_at":"2025-05-01 23:48:31","reason":"found in this entry's text"}],"entries_total":7,"docs":[{"source":"claude-code","path":"env-vars","title":"Environment variables","documented":true},{"source":"claude-code","path":"agent-view","title":"Manage multiple agents with agent view","documented":false},{"source":"claude-code","path":"amazon-bedrock","title":"Claude Code on Amazon Bedrock","documented":false},{"source":"claude-code","path":"cli-reference","title":"CLI reference","documented":false},{"source":"claude-code","path":"desktop","title":"Desktop application","documented":false},{"source":"claude-code","path":"errors","title":"Error reference","documented":false},{"source":"claude-code","path":"google-vertex-ai","title":"Claude Code on Google Cloud's Agent Platform","documented":false},{"source":"claude-code","path":"hooks","title":"Hooks reference","documented":false},{"source":"claude-code","path":"llm-gateway-rollout","title":"Roll out an LLM gateway for your organization","documented":false},{"source":"claude-code","path":"managed-settings","title":"Deploy managed settings","documented":false}],"docs_total":13,"gates":[],"related":[{"name":"ANTHROPIC_API_KEY","slug":"anthropic-api-key","description":"API key sent as `X-Api-Key` header. When set, this key is used instead of your Claude Pro, Max, Team, or Enterprise subscription even if you are logged in. In non-interactive mode (`-p`), the key is always used when present. In interactive mode, you are prompted to approve the key once before it overrides your subscription. To use your subscription instead, run `unset ANTHROPIC_API_KEY`"},{"name":"ANTHROPIC_AUTH_TOKEN","slug":"anthropic-auth-token","description":"Custom value for the `Authorization` header (the value you set here will be prefixed with `Bearer `)"},{"name":"ANTHROPIC_AWS_API_KEY","slug":"anthropic-aws-api-key","description":"Workspace API key for [Claude Platform on AWS](\/docs\/en\/claude-platform-on-aws), generated in the AWS Console. Sent as `x-api-key` and takes precedence over AWS SigV4"},{"name":"ANTHROPIC_AWS_BASE_URL","slug":"anthropic-aws-base-url","description":"Override the [Claude Platform on AWS](\/docs\/en\/claude-platform-on-aws) endpoint URL. Use for custom regions or when routing through an [LLM gateway](\/docs\/en\/llm-gateway). Defaults to `https:\/\/aws-external-anthropic.{region}.api.aws`. Claude Code resolves the region with the [same precedence as on Amazon Bedrock](\/docs\/en\/amazon-bedrock#3-configure-claude-code)"},{"name":"ANTHROPIC_AWS_WORKSPACE_ID","slug":"anthropic-aws-workspace-id","description":"Required for [Claude Platform on AWS](\/docs\/en\/claude-platform-on-aws). Sent on every request as the `anthropic-workspace-id` header"},{"name":"ANTHROPIC_BASE_URL","slug":"anthropic-base-url","description":"Override the API endpoint to route requests through a proxy or gateway. When set to a non-first-party host, [MCP tool search](\/docs\/en\/mcp#scale-with-mcp-tool-search) is disabled by default. Set `ENABLE_TOOL_SEARCH=true` if your proxy forwards `tool_reference` blocks. As of v2.1.196, [Remote Control](\/docs\/en\/remote-control#requirements) is disabled when this points at a host other than `api.anthropic.com`, matching its behavior on Amazon Bedrock, Google Cloud's Agent Platform, and Microsoft Foundry"},{"name":"ANTHROPIC_BEDROCK_BASE_URL","slug":"anthropic-bedrock-base-url","description":"Override the Amazon Bedrock endpoint URL. Use for custom Amazon Bedrock endpoints or when routing through an [LLM gateway](\/docs\/en\/llm-gateway). See [Amazon Bedrock](\/docs\/en\/amazon-bedrock)"},{"name":"ANTHROPIC_BEDROCK_MANTLE_BASE_URL","slug":"anthropic-bedrock-mantle-base-url","description":"Override the Amazon Bedrock Mantle endpoint URL. See [Mantle endpoint](\/docs\/en\/amazon-bedrock#use-the-mantle-endpoint)"},{"name":"ANTHROPIC_BEDROCK_REGION_PREFIX","slug":"anthropic-bedrock-region-prefix","description":"Cross-region inference profile prefix (`us`, `eu`, `apac`, `jp`, `au`, or `global`) Claude Code tries first instead of the one derived from the AWS region. Ignored in AWS GovCloud regions. Requires Claude Code v2.1.224 or later. See [Amazon Bedrock](\/docs\/en\/amazon-bedrock#cross-region-inference-profile-prefixes)"},{"name":"ANTHROPIC_BEDROCK_SERVICE_TIER","slug":"anthropic-bedrock-service-tier","description":"Amazon Bedrock [service tier](https:\/\/docs.aws.amazon.com\/bedrock\/latest\/userguide\/service-tiers-inference.html) (`default`, `flex`, or `priority`). Sent as the `X-Amzn-Bedrock-Service-Tier` header. See [Amazon Bedrock](\/docs\/en\/amazon-bedrock#service-tiers)"}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/anthropic-model","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}