{"name":"ANTHROPIC_DEFAULT_MODEL","slug":"anthropic-default-model","family":"env","title":"Environment variables","noun":"environment variable","description":"Model that new sessions start on by default. Requires Claude Code v2.1.236 or later. See [Set a default model for new sessions](\/docs\/en\/model-config#set-a-default-model-for-new-sessions)","description_source":"docs","described_by":{"doc":"claude-code\/env-vars","title":"Environment variables"},"presence":{"first_seen":"2.1.236","removed_in":null,"in_current_build":true,"newest_mined":"2.1.308","builds":62,"mined_builds":149,"first_cited":{"version":"2.1.236","released_at":"2026-08-19 18:45:14","spans":4}},"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.275","anchor":"new-settings-env-default-model-source-classification-when","heading":"New 'settings_env_default' model-source classification when ANTHROPIC_DEFAULT_MODEL is set via managed settings","line":"Model-source tracking adds a 'settings_env_default' label for ANTHROPIC_DEFAULT_MODEL set via managed settings","released_at":"2026-09-17 20:20:31","reason":"found in this entry's text, named in this entry"},{"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.236","anchor":"startup-records-whether-anthropic-default-model-actually-too","heading":"Startup records whether ANTHROPIC_DEFAULT_MODEL actually took effect","line":"Startup now records whether your default-model environment variable actually won or was overridden.","released_at":"2026-08-19 18:45:14","reason":"named in this entry, found in this entry's text"}],"entries_total":5,"docs":[{"source":"claude-code","path":"env-vars","title":"Environment variables","documented":true},{"source":"claude-code","path":"amazon-bedrock","title":"Claude Code on Amazon Bedrock","documented":false},{"source":"claude-code","path":"google-vertex-ai","title":"Claude Code on Google Cloud's Agent Platform","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":"self-hosted-environments-configuration","title":"Customize sessions in self-hosted environments","documented":false},{"source":"claude-code","path":"settings-reference","title":"All settings","documented":false},{"source":"claude-code","path":"whats-new\/2026-w34","title":"Week 34 \u00b7 August 17\u201321, 2026","documented":false},{"source":"claude-code","path":"whats-new\/index","title":"What's new","documented":false}],"docs_total":9,"gates":[],"related":[{"name":"ANTHROPIC_DEFAULT_FABLE_MODEL","slug":"anthropic-default-fable-model","description":"Model ID that the `fable` alias resolves to, and the ID Claude Code recognizes as a Fable model for [automatic model fallback](\/docs\/en\/model-config#automatic-model-fallback) on third-party providers. See [Model configuration](\/docs\/en\/model-config#environment-variables)"},{"name":"ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION","slug":"anthropic-default-fable-model-description","description":"Display description for the pinned Fable model in the `\/model` picker. When not set, the row shows a default description that begins `Custom Fable model`. See [Model configuration](\/docs\/en\/model-config#customize-pinned-model-display-and-capabilities)"},{"name":"ANTHROPIC_DEFAULT_FABLE_MODEL_NAME","slug":"anthropic-default-fable-model-name","description":"Display name for the pinned Fable model in the `\/model` picker. When not set, the row shows the model's name if Claude Code recognizes the pinned ID, and the pinned ID otherwise. See [Model configuration](\/docs\/en\/model-config#customize-pinned-model-display-and-capabilities)"},{"name":"ANTHROPIC_DEFAULT_HAIKU_MODEL","slug":"anthropic-default-haiku-model","description":"Model ID that the `haiku` alias resolves to, also used for [background functionality](\/docs\/en\/costs#background-token-usage). See [Model configuration](\/docs\/en\/model-config#environment-variables)"},{"name":"ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION","slug":"anthropic-default-haiku-model-description","description":"Display description for the pinned Haiku model in the `\/model` picker. When not set, the row shows a default description that begins `Custom Haiku model`. See [Model configuration](\/docs\/en\/model-config#customize-pinned-model-display-and-capabilities)"},{"name":"ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME","slug":"anthropic-default-haiku-model-name","description":"Display name for the pinned Haiku model in the `\/model` picker. When not set, the row shows the model's name if Claude Code recognizes the pinned ID, and the pinned ID otherwise. See [Model configuration](\/docs\/en\/model-config#customize-pinned-model-display-and-capabilities)"},{"name":"ANTHROPIC_DEFAULT_OPUS_MODEL","slug":"anthropic-default-opus-model","description":"Model ID that the `opus` alias resolves to, and that `opusplan` uses while Plan Mode is active. See [Model configuration](\/docs\/en\/model-config#environment-variables)"},{"name":"ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION","slug":"anthropic-default-opus-model-description","description":"Display description for the pinned Opus model in the `\/model` picker. When not set, the row shows a default description that begins `Custom Opus model`. See [Model configuration](\/docs\/en\/model-config#customize-pinned-model-display-and-capabilities)"},{"name":"ANTHROPIC_DEFAULT_OPUS_MODEL_NAME","slug":"anthropic-default-opus-model-name","description":"Display name for the pinned Opus model in the `\/model` picker. When not set, the row shows the model's name if Claude Code recognizes the pinned ID, and the pinned ID otherwise. See [Model configuration](\/docs\/en\/model-config#customize-pinned-model-display-and-capabilities)"},{"name":"ANTHROPIC_DEFAULT_SONNET_MODEL","slug":"anthropic-default-sonnet-model","description":"Model ID that the `sonnet` alias resolves to, and that `opusplan` uses when Plan Mode is not active. See [Model configuration](\/docs\/en\/model-config#environment-variables)"}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/anthropic-default-model","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}