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: An official docs page names this item.
. For rows marked
Undocumented: Only the program shows this item. It can change without notice.
, 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
advisorModel
Documented: An official docs page names this item.
string-Pick which model answers when Claude asks the advisor tool.Any settings file
alwaysThinkingEnabled
Documented: An official docs page names this item.
boolean-Turn extended thinking off for every session.Any settings file
availableModels
Documented: An official docs page names this item.
array of string-Restrict which models people can pick. It accepts family aliases (opus), version prefixes (opus-4-5), and full model IDs. An empty array leaves only the default model.Any settings file
availableModelsMatch
Documented: An official docs page names this item.
Managed Only: Works only in managed (organization policy) settings.
enum: 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
deniedModels
Documented: An official docs page names this item.
Managed Only: Works only in managed (organization policy) settings.
array 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
effortLevel
Documented: An official docs page names this item.
enum: low, medium, high, xhigh-Set a default effort level for models without a saved level of their own. Claude Code saves levels for supported models.Any settings file
enforceAvailableModels
Documented: An official docs page names this item.
boolean-Keep the /model Default choice inside your availableModels allowlist. It has no effect when availableModels is unset or empty.Any settings file
fallbackModel
Documented: An official docs page names this item.
array of string-Name backup models for when the primary is overloaded. Claude Code tries the models in order. The --fallback-model flag wins. default expands to the default model.Any settings file
fastMode
Documented: An official docs page names this item.
boolean-Turn fast mode on for sessions where it's available.Any settings file
fastModePerSessionOptIn
Documented: An official docs page names this item.
boolean-Require people to turn fast mode on each session. Each session starts with fast mode off.Any settings file
maxEffortLevel
Documented: An official docs page names this item.
string-Cap the effort level for every model or per model, on every provider. The lowest value across files wins. Claude Code does not clamp an effort set through CLAUDE_CODE_EXTRA_BODY.Any settings file
model
Documented: An official docs page names this item.
string-Change the model Claude Code starts with.Any settings file
modelOverrides
Documented: An official docs page names this item.
object-Map model IDs to your provider's IDs, such as Bedrock ARNs. Usually set in managed settings. Since 2.1.305, /effort and /autocompact settings apply even when the model name differs from a modelOverrides value by letter case or a [1m] tag (v2.1.305 release).Any settings file
modelPicker
Documented: An official docs page names this item.
object-Choose which models the /model picker lists, in your own order and with your own labels. Claude Code reads it only from managed, --settings, and user settings. The first source that sets it wins whole.User or managed settings
modelPricing
Documented: An official docs page names this item.
Managed Only: Works only in managed (organization policy) settings.
object-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
modelSettings
Documented: An official docs page names this item.
object: model name to {effortLevel, maxEffortLevel, autoCompactWindow}-Keep a saved effort level (low, medium, high, xhigh), a top effort cap (maxEffortLevel), or an auto-compact window ("auto" or 100000 to 1000000 tokens) for each model. /autocompact saves here. Claude Code drops invalid values. Across settings files the lowest cap wins. Source: the program.Any settings file
promptCacheTtl
Documented: An official docs page names this item.
string-Choose the prompt cache lifetime for the main conversation. The values are 5m or 1h. When unset, it 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
showThinkingSummaries
Documented: An official docs page names this item.
boolean-See summaries of Claude's thinking instead of a collapsed stub.Any settings file
subagentPromptCacheTtl
Documented: An official docs page names this item.
string-Choose the prompt cache lifetime for subagent requests. The values are 5m or 1h. When unset, it is 5 minutes unless ENABLE_PROMPT_CACHING_1H=1. CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL wins.Any settings file
switchModelsOnFlag
Documented: An official docs page names this item.
boolean-Switch models automatically or pause when a safety classifier flags a request.Any settings file
totalTokensReminder
Undocumented: Only the program shows this item. It can change without notice.
enum: 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
totalTokensReminderAfterUserTurn
Undocumented: Only the program shows this item. It can change without notice.
booleanOnRepeat 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
totalTokensReminderBudget
Undocumented: Only the program shows this item. It can change without notice.
integer15000000Set 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
{
"$schema": "https://clawdipedia.cc/schemas/claude-code-settings.json",
"model": "opus",
"effortLevel": "high",
"fallbackModel": ["sonnet"],
"promptCacheTtl": "1h"
}