
What Does /model Do in Claude Code? (Switching Between Opus, Sonnet, and Haiku)
The /model command lets you switch between Claude Opus, Sonnet, and Haiku mid-session. Here's when to use each model and how the opusplan mode works.
Claude Code doesn't lock you into one model. The /model command lets you switch between Opus, Sonnet, and Haiku on the fly — keeping your full conversation context while changing the brain behind the responses.
How do you switch models?
/model # List available models
/model sonnet # Switch to Sonnet 4.6
/model opus # Switch to Opus 4.6
/model haiku # Switch to Haiku 4.5
/model opusplan # Enable hybrid mode
The switch takes effect immediately. Your conversation history, file reads, and context all carry over — only the model processing your next message changes.
When should you use each model?
Opus 4.6 — The deep thinker
Best for: Complex architecture decisions, large-scale refactoring, tracking down subtle bugs, planning multi-file changes.
Cost: $5/1M input, $25/1M output (API) — the most expensive option.
Use Opus when the problem requires holding many concepts in mind simultaneously. If you're refactoring authentication across 15 files, Opus is worth the premium. For writing a simple utility function, it's overkill.
Sonnet 4.6 — The daily driver
Best for: Feature implementation, test writing, documentation, code review, most day-to-day work.
Cost: $3/1M input, $15/1M output (API) — best balance of speed and quality.
Sonnet handles 80%+ of coding tasks at near-Opus quality with faster responses. Start here and only switch to Opus when Sonnet struggles.
Haiku 4.5 — The sprinter
Best for: Simple transformations, quick questions, high-volume repetitive tasks, boilerplate generation.
Cost: The fastest and most affordable option.
Use Haiku for mechanical work — renaming variables across files, generating test boilerplate, formatting data, or answering straightforward questions where depth doesn't matter.
What is opusplan mode?
The /model opusplan command enables an automated hybrid approach:
- Planning phase — Claude uses Opus for complex reasoning, architecture analysis, and decision-making
- Execution phase — Claude automatically switches to Sonnet for code generation and implementation
This gives you Opus-quality thinking without Opus-cost execution. It's particularly useful for tasks that start with "figure out what needs to change" and end with "now make the changes."
Can you switch models multiple times in one session?
Yes, as many times as you want. A common workflow:
- Start with Sonnet for the initial feature work
- Switch to Opus when you hit a tricky architectural question
- Back to Sonnet for implementing the solution
- Switch to Haiku for generating test boilerplate
Your context carries over seamlessly each time.
How does /model interact with plan limits?
On Pro ($20/month), you have standard usage limits across all models. Switching to a cheaper model doesn't give you more messages — the limits are per-plan, not per-model.
On Max plans, the token budget is larger and model switching is more practical for cost optimization.
On API credits, model choice directly affects your spend. Switching from Opus to Sonnet for implementation saves roughly 40% on input tokens and 40% on output tokens.
What's the default model?
Claude Code defaults to Sonnet 4.6 on most plans. You can change the default by:
- Using the
--modelCLI flag when launching:claude --model opus - Setting it in your configuration
- Using
/modelat the start of each session