Logo Vincent
Back to all posts

Claude Code /model: Opus vs Sonnet vs Haiku Guide

Claude
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:

ModelModel IDCharacteristics
Claude Opus 4.6claude-opus-4-6Most powerful, ideal for complex reasoning and architecture
Claude Sonnet 4.6claude-sonnet-4-6Balanced choice, good speed and capability
Claude Haiku 4.5claude-haiku-4-5-20251001Fastest 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:

  1. Planning phase → Switch to Opus for architecture and approach discussions
  2. Coding phase → Switch back to Sonnet for implementation
  3. 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)
TimingSwitch anytime during conversationSpecified when launching Claude Code
PersistenceCurrent session onlyCurrent session only
FlexibilityCan switch back and forth multiple timesCan still be overridden by /model
Best forDynamically adjusting based on task complexityUsing 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.

© 2026 vincentqiao.com . All rights reserved.