How to Change the Model in Claude Code (and Which One to Pick)
Switch models in Claude Code with /model, the --model flag, an environment variable or settings.json. What the aliases mean — opus, sonnet, haiku, fable, opusplan, [1m] — which is the default, and how to choose for cost and quality.
Claude Code doesn't lock you to one model. You can switch mid-conversation, start a session on a specific model, or set a default for every session. Choosing well is one of the easiest ways to make Claude Code faster or cheaper without making it worse.
Model names and defaults below match Anthropic's model-configuration docs as of October 2026. New models arrive often; the aliases keep working when they do.
The four ways to change model
From highest to lowest priority:
1. During a session: /model
Type /model to open a picker. Press Enter to switch and save it as your default, or s to switch for this session only. Or skip the picker:
/model sonnet
/model opus
2. When starting: --model
claude --model sonnet
3. An environment variable
export ANTHROPIC_MODEL=sonnet
4. Your settings file
In ~/.claude/settings.json (or a project's .claude/settings.json):
{
"model": "sonnet"
}
See Claude Code settings explained for how user, project and local settings combine.
To check which model you're on, run /status, or add it to your status line.
What the aliases mean
You'll rarely type full model IDs. Aliases always point at the latest model of each kind:
| Alias | What it means |
|---|---|
default |
Removes any override; uses your account's default |
opus |
The latest Opus — strong reasoning for complex work |
sonnet |
The latest Sonnet — fast and capable for everyday coding |
haiku |
The fast, cheap model for simple tasks |
fable |
Anthropic's most capable model, for the hardest, longest tasks (where available) |
best |
Fable where available, otherwise Opus |
opusplan |
Opus while planning, Sonnet while carrying out the plan |
opus[1m], sonnet[1m] |
A 1-million-token context window on models that need the suffix |
On the Anthropic API and on Pro, Max, Team and Enterprise plans, the default is currently Opus 5.5. The newest Sonnet, Opus and Fable models already have a 1-million-token context window without the [1m] suffix; the suffix matters for some older models.
Which model should you use?
A simple rule from Anthropic's own guidance: Sonnet handles most coding tasks well and costs less than Opus. Reserve Opus for complex architecture and multi-step reasoning.
In practice:
- Everyday edits, small features, bug fixes with a clear cause: Sonnet.
- Designing something new, a gnarly bug, a refactor across many files: Opus (or
opusplanto plan with Opus and execute with Sonnet). - Very long, open-ended or high-stakes work: Fable, if your plan includes it.
- Simple, repetitive jobs, especially in subagents: Haiku. You can set
model: haikuin a subagent's configuration.
Effort is the other dial
Each model also has an effort level — how much it thinks before answering. Lower effort means fewer tokens and faster replies on easy tasks. Change it with /effort or inside /model. On the newest models, thinking can't be turned off entirely, but lowering effort has a similar effect.
Models and usage limits
On a subscription, there are two kinds of limit:
- Session and weekly limits are shared across all models. Switching model won't get you around them.
- Model-specific limits — a message like "You've hit your Opus limit" — can be worked around by switching to another model family with
/model.
Using Sonnet for routine work makes your plan's limits last noticeably longer. On an API key, it lowers the bill directly. See how to keep Claude Code costs down for more.
The summary
/modelswitches mid-session;--model,ANTHROPIC_MODELand"model"in settings set it up front.- Use aliases (
sonnet,opus,haiku,fable,opusplan) rather than full IDs. - Default is Opus 5.5 today; Sonnet is the cost-effective choice for most coding.
- Lower effort for simple tasks; switch families if you hit a model-specific limit.
EasySpawn hosts Claude Code on a persistent server and lets you bring your own Claude subscription or API key — so your model choice, settings and usage stay entirely yours. See how it works or join the waitlist.
Related: Claude Pro vs Max vs API Key · What Are Tokens in AI? · Claude Code /compact vs /clear · What Is an LLM?
Keep reading
How to Price Your SaaS: A Beginner's Guide to Charging for Your App
Pricing is the decision first-time founders avoid longest. How to pick a pricing model (flat, tiered, per-seat, usage), how to set a first number, why free plans are expensive, how AI costs change the maths, and how to raise prices later.
Claude Opus vs Sonnet vs Haiku: Which Model Should You Use?
Anthropic's Claude models come in tiers — Opus, Sonnet and Haiku, plus Fable at the top. What each is good at, what they cost on the API, and a simple rule for choosing for coding, chat and features inside your own app.