Key Takeaways
- Anthropic's official guide reveals three methods to switch Claude Code models: /model command, --model flag, and ANTHROPIC_MODEL env variable.
- Choose the right model for each task.
What Changed — Official Model Switching Guide
Anthropic has published a comprehensive guide on how to change which Claude model powers your Claude Code sessions. While many users assumed model selection was a one-time setup, this guide reveals three distinct methods — each suited for different workflows.
Supported models now include:
- Opus 4.7 (
claude-opus-4-7) — the newest frontier reasoning model, featuring 3.75MP vision and improved agentic coding - Sonnet 4.6 (
claude-sonnet-4-6) — the default, balanced for speed and capability - Opus 4.6 (
claude-opus-4-6) — the previous top-tier model - Opus 4.5 (
claude-opus-4-5-20251101) - Haiku 4.5 (
claude-haiku-4-5-20251001) — fastest, cheapest - Sonnet 4.5 (
claude-sonnet-4-5-20250929)
⚠️ Pro plan users: Opus models require enabling and purchasing extra usage.
What It Means For You
This isn't just a convenience feature — it's a cost and performance lever. Here's how to think about it:
- Opus 4.7 for complex refactoring, multi-file changes, and deep reasoning tasks where you'd wait an extra 10-20 seconds for better output.
- Sonnet 4.6 as your daily driver — it's the default for good reason.
- Haiku 4.5 for quick lookups, simple edits, or when you're burning through tokens on a Pro plan.
This follows the release of Claude Opus 4.7 on April 20, 2026 — the model that achieved 87.6% on SWE-Bench with constrained cyber capabilities. The new tokenizer in Opus 4.7 increases token counts for the same input, so you might want to reserve it for high-stakes work.
Try It Now
Method 1: Instant switch with /model (easiest)

From within any Claude Code session:
/model
Select your desired model from the interactive menu. Change takes effect immediately. Verify with:
/status
Method 2: One-session override with --model flag
Start a fresh session with a specific model:
claude --model claude-opus-4-7
This overrides your default for that session only. Perfect for one-off complex tasks.
Method 3: Permanent default via environment variable
Set your preferred model for all future sessions by adding to your shell config:
For ZSH (macOS default):
echo 'export ANTHROPIC_MODEL="claude-opus-4-7"' >> ~/.zshrc
source ~/.zshrc
For BASH (Linux default):
echo 'export ANTHROPIC_MODEL="claude-sonnet-4-6"' >> ~/.bashrc
source ~/.bashrc
Close Terminal completely, reopen, and start Claude Code:
claude
Pro Tips
- Check current model anytime:
/statusin Claude Code - Per-project defaults: Set
ANTHROPIC_MODELin a.envfile or your project'sCLAUDE.mdconfig - Cost-conscious: Use Haiku 4.5 for CI/CD scripts or automated review tasks
- Model availability: The
/modelmenu only shows models your account has access to — no guessing

gentic.news Analysis
This guide arrives at a critical inflection point for Claude Code users. With Claude Opus 4.7 now available (released April 20, 2026, with an updated tokenizer), and the recent pricing shift where Anthropic removed Claude Code from the $20 plan (covered in our April 23 article), model selection directly impacts your bill.
Claude Code has appeared in 58 articles this week alone (total: 634 across gentic.news), reflecting massive adoption. The ability to switch models per-task isn't just nice-to-have — it's essential for managing token costs while still accessing frontier reasoning when needed.
What you should do differently:
- Create a default model strategy: Set Sonnet 4.6 as your permanent default via
ANTHROPIC_MODEL, then use--model claude-opus-4-7for specific complex tasks - Add a CLAUDE.md note: "Use Opus 4.7 for architecture decisions and refactoring; use Sonnet 4.6 for implementation"
- Monitor usage: Run
/statusfrequently to ensure you're not accidentally running Opus on trivial tasks - Consider Haiku for automation: If you're building MCP servers or automated scripts (like the Playwright MCP Server we covered on April 21), Haiku 4.5 can handle 80% of tasks at a fraction of the cost
This guide also aligns with the trend toward model routing — the practice of selecting the right model for each task rather than using one model for everything. As the Claude model family expands, this becomes a superpower.









