Skip to main content

Model Settings

These keys choose the model Claude Code uses and how hard it thinks. Administrators also use them to allow or block models. Several keys have a matching environment variable that wins over the key.

Use /model or edit a settings file. fastMode, alwaysThinkingEnabled, and enforceAvailableModels switch features.

Keys​

Source: Settings Reference for rows marked Documented. For rows marked Undocumented, Source: the program (its bundled settings schema). Where to Set It tells you which files may set the key. See Settings Files and Scopes.

KeyStatusTypeDefaultWhat It DoesWhere to Set It
advisorModelDocumentedstring-Pick which model answers when Claude asks the advisor tool.Any settings file
alwaysThinkingEnabledDocumentedboolean-Turn extended thinking off for every session.Any settings file
availableModelsDocumentedarray of string-Restrict which models people can pick. Accepts family aliases (opus), version prefixes (opus-4-5), and full model IDs. An empty array leaves only the default model.Any settings file
🔒 availableModelsMatchDocumentedenum: prefix, exact-Make each availableModels model ID entry permit only the version it names. prefix is the default. exact stops an entry from allowing other versions.Managed settings only
🔒 deniedModelsDocumentedarray of string-Block specific models, even ones availableModels permits. A family alias blocks the family. Claude Code does not start if no allowed model is left for Default.Managed settings only
effortLevelDocumentedenum: low, medium, high, xhigh-Set a default effort level for models without a saved level of their own. Saved for supported models.Any settings file
enforceAvailableModelsDocumentedboolean-Keep the /model Default choice inside your availableModels allowlist. Has no effect when availableModels is unset or empty.Any settings file
fallbackModelDocumentedarray of string-Name backup models for when the primary is overloaded. Models are tried in order. The --fallback-model flag wins. default expands to the default model.Any settings file
fastModeDocumentedboolean-Turn fast mode on for sessions where it's available.Any settings file
fastModePerSessionOptInDocumentedboolean-Require people to turn fast mode on each session. Each session starts with fast mode off.Any settings file
maxEffortLevelDocumentedstring-Cap the effort level for every model or per model, on every provider. The lowest value across files wins. An effort set through CLAUDE_CODE_EXTRA_BODY is not clamped.Any settings file
modelDocumentedstring-Change the model Claude Code starts with.Any settings file
modelOverridesDocumentedobject-Map model IDs to your provider's IDs, such as Bedrock ARNs. Usually set in managed settings.Any settings file
modelPickerDocumentedobject-Choose which models the /model picker lists, in your own order and with your own labels. Read only from managed, --settings, and user settings. The first source that sets it wins whole.User or managed settings
🔒 modelPricingDocumentedobject-Report spend at your organization's contracted rates instead of list price. overrides maps a model ID to USD rates per million tokens. The figures stay estimates.Managed settings only
modelSettingsDocumented❓-Keep a saved effort level or auto-compact window per model, or cap one model's effort.Any settings file
promptCacheTtlDocumentedstring-Choose the prompt cache lifetime for the main conversation. 5m or 1h. Unset is 1 hour on a subscription and 5 minutes on an API key or cloud provider. CLAUDE_CODE_PROMPT_CACHE_TTL wins.Any settings file
showThinkingSummariesDocumentedboolean-See summaries of Claude's thinking instead of a collapsed stub.Any settings file
subagentPromptCacheTtlDocumentedstring-Choose the prompt cache lifetime for subagent requests. 5m or 1h. Unset is 5 minutes unless ENABLE_PROMPT_CACHING_1H=1. CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL wins.Any settings file
switchModelsOnFlagDocumentedboolean-Switch models automatically or pause when a safety classifier flags a request.Any settings file
totalTokensReminderUndocumentedenum: off, infinite, fixed, countdown, padded-countdownpadded-countdownAdd a "tokens left" reminder to the system prompt and after each tool result. Modes: off, infinite, fixed, countdown, padded-countdown. CLAUDE_CODE_TOTAL_TOKENS_REMINDER wins.Settings files
totalTokensReminderAfterUserTurnUndocumentedbooleanOnRepeat the "tokens left" reminder after each user prompt. When off, it shows only in the system prompt and after tool results. CLAUDE_CODE_TOTAL_TOKENS_REMINDER_AFTER_USER_TURN wins.Settings files
totalTokensReminderBudgetUndocumentedinteger15000000Set the starting token budget of padded-countdown. CLAUDE_CODE_TOTAL_TOKENS_REMINDER_BUDGET wins.Settings files

Example​

Opus at High Effort with a Fallback​

This file starts each session on Opus at high effort. If Opus is overloaded, Claude Code tries Sonnet. The main conversation keeps its prompt cache for one hour.

~/.claude/settings.json
{
"model": "opus",
"effortLevel": "high",
"fallbackModel": ["sonnet"],
"promptCacheTtl": "1h"
}