Claude Code /model: Opus vs Sonnet vs Haiku Guide
What is /model
When coding with Claude Code, you might run into situations like:
- A simple rename refactor where using the most powerful model feels wasteful
- A complex architecture decision where the current model doesn’t feel capable enough
- Wanting to quickly compare how different models respond to the same question
That’s where the /model command comes in.
/model is a slash command in Claude Code that lets you switch to a different Claude model mid-conversation, without restarting.
How to Use It
Check Current Model
In Claude Code’s interactive mode, simply type:
/model
A model selection list will appear, with your currently active model highlighted.
Switch Models
Select the model you want from the list. The switch takes effect immediately, and your conversation context is fully preserved.
You can also specify a default model when launching Claude Code with the --model flag:
claude --model claude-opus-4-6
Available Models
Claude Code currently supports these models:
| Model | Model ID | Characteristics |
|---|---|---|
| Claude Opus 4.6 | claude-opus-4-6 | Most powerful, ideal for complex reasoning and architecture |
| Claude Sonnet 4.6 | claude-sonnet-4-6 | Balanced choice, good speed and capability |
| Claude Haiku 4.5 | claude-haiku-4-5-20251001 | Fastest and cheapest, great for simple tasks |
The default model is Sonnet — for most everyday coding tasks, it offers the best balance of cost and performance.
When to Use Which Model
Opus: Complex Tasks
Opus is the most capable model in the Claude family, best for scenarios requiring deep thinking:
- Architecture design — designing new systems, planning module structure, choosing tech approaches
- Complex debugging — tracing tricky bugs across multiple files, understanding complex call chains
- Large-scale refactoring — code refactoring involving multiple files and modules
- Code review — reviews requiring deep understanding of business logic
Sonnet: Everyday Tasks
Sonnet is the default choice, covering the vast majority of daily development:
- New features — implementing new components, APIs, or pages
- Bug fixes — routine bug fixes
- Writing tests — adding unit tests for existing code
- Small refactors — renaming variables, extracting functions, restructuring
Haiku: Simple Tasks
Haiku is the fastest and cheapest, perfect for tasks that don’t need much reasoning:
- Code formatting — adjusting indentation, adding comments
- Quick lookups — checking API usage, looking up config options
- Boilerplate code — creating config files, writing repetitive code
- Quick explanations — explaining what a piece of code does
Practical Tips
Tip 1: Switch by Task Phase
A typical development workflow can mix models like this:
- Planning phase → Switch to Opus for architecture and approach discussions
- Coding phase → Switch back to Sonnet for implementation
- Finishing phase → Switch to Haiku for formatting, comments, and cleanup
Tip 2: Context is Preserved
Switching models doesn’t clear your conversation history. You can write code with Sonnet, switch to Opus to review it, then switch back to Sonnet to continue. The entire conversation context carries over seamlessly.
Tip 3: Set a Default with —model
If you mainly do architecture work, set Opus as your default:
claude --model claude-opus-4-6
Or if speed is your priority, default to Haiku:
claude --model claude-haiku-4-5-20251001
Tip 4: Use /cost to Monitor Spending
After switching models, use the /cost command to check token usage and costs for the current session, helping you understand the cost differences between models.
/model vs —model
| /model (in-session switch) | —model (launch-time flag) | |
|---|---|---|
| Timing | Switch anytime during conversation | Specified when launching Claude Code |
| Persistence | Current session only | Current session only |
| Flexibility | Can switch back and forth multiple times | Can still be overridden by /model |
| Best for | Dynamically adjusting based on task complexity | Using a fixed model preference |
They work together. Set a default with --model, then use /model to switch on the fly when needed.
Final Thoughts
/model is a simple but powerful command. Its core value is: letting you choose the right model for the actual task, instead of a one-size-fits-all approach.
Opus for hard problems, Sonnet for daily development, Haiku for quick tasks — smart model switching not only improves efficiency but also saves costs.
Next time you’re in Claude Code, try switching to Haiku for a simple task and feel the blazing-fast response. When you hit a tough problem, switch to Opus and let the most powerful model help you break it down. Flexible switching is how you get the most out of Claude Code.
More Articles
- I Built a Bot That Runs Claude Code From Chat
- Claude Code /fast: Same Opus, 2x Speed — Worth It?
- Claude Code /init: Generate CLAUDE.md in 10 Seconds
- Claude Code MCP: Give Your AI Access to Any Tool
- Claude Code in 2026: The Only Setup Guide You Need
- The Complete Guide to Claude: From Chat to Code to Automation
- CCBot - 24x Development Efficiency Boost
- Shocking! This Tool Lets Programmers Finish 95 Minutes of Work in 4 Minutes! 24x Efficiency Boost
- Claude Code /add-dir: The Monorepo Command You Miss
- Claude Code /compact: Free Up Context, Keep Progress
- Claude Code /btw Command Explained: Quick Side Questions Without Breaking Flow
- Claude Code /stats: See How Much AI Does For You
- Claude Code /status Command Explained: Your Session Dashboard
- Why AI-First Startups Only Need One Programming Language
- Best Practice for External Knowledge in Claude Code: GitHub MCP + Context7
- Claude Code Token-Saving Tip: The Power of the Exclamation Mark
- Claude Code /resume Command Explained: Don't Let Your Conversations Go to Waste
- Claude Code /usage Command Explained: Know Your Remaining Quota
- Claude Code /tasks Command Explained: Master Your Background Tasks
- Claude Code Skills Explained: Build Your Custom Command Library
- Claude Code /plan Explained: Think Before You Code
- Claude Code /memory Explained: Make AI Truly Remember Your Project
- cc-ping: Ping All Your Claude Code Configs in One Command