Claude Code officially supports Claude Fable 5, Claude Opus 5, Claude Sonnet 5, and Claude Haiku 4.5. For complex agentic coding, Opus 5 is the safest default. For the hardest, longest-running sessions, Fable 5 is the top end. For everyday work, Sonnet 5 is the balanced choice. For quick, cheap loops, Haiku 4.5 is the speed play.
What Claude Code Supports Right Now
Claude Code does not treat every model the same way. The built-in aliases map to a specific Claude family member, and those aliases can resolve differently depending on the provider.
| Model | Best use case | Why it fits Claude Code |
|---|---|---|
| Claude Fable 5 | Long-running agent work | Highest capability, 1M context, strongest for deep investigation |
| Claude Opus 5 | Complex coding and enterprise work | Anthropic’s recommended starting point for serious agentic coding |
| Claude Sonnet 5 | Daily coding tasks | Best balance of speed and intelligence |
| Claude Haiku 4.5 | Small tasks and fast loops | Fastest option with near-frontier quality |
The practical takeaway is simple: do not pick by brand alone. Pick by task size, latency tolerance, and how much autonomy the session needs.
How Claude Code Chooses a Model
Claude Code lets you set a model by alias or by full model name. You can switch in-session with /model, launch with claude --model <name>, or set ANTHROPIC_MODEL.
claude --model sonnet
export ANTHROPIC_MODEL="claude-sonnet-5"
The important detail is that ANTHROPIC_BASE_URL changes where requests are sent, not which model answers them. If you point Claude Code at a gateway, that gateway decides what model IDs it exposes.
Claude Code also resolves aliases by provider. On the Anthropic API, opus maps to Opus 5 and sonnet maps to Sonnet 5. On other providers, those same aliases can resolve to older or different model versions. If you need reproducibility, pin the full model name.
Best Model for Each Coding Workload
If you are choosing for a real coding workload, use this split:
- Fable 5 for huge migrations, long debugging sessions, and tasks that need repeated self-checking.
- Opus 5 for the hardest agentic coding jobs where correctness matters more than raw speed.
- Sonnet 5 for the default day-to-day balance of speed, context, and quality.
- Haiku 4.5 for quick edits, short tool loops, and lightweight automation.
For most teams, Sonnet 5 is the first model to standardize on. If the task starts to feel like an investigation rather than an edit, move up to Opus 5. If the session becomes a marathon, Fable 5 is the better ceiling.
When Novita AI Makes Sense
If you want the Claude Code workflow but need more backend flexibility, Novita AI is the natural fit. Novita documents an Anthropic-compatible endpoint for Claude Code-style integrations, which lets you keep the same terminal workflow while routing to models in Novita’s catalog.
That matters in two cases:
- You want to compare coding models without rewriting your agent loop.
- You want to use a Claude Code-compatible interface with open models such as Kimi K2.
For example, Novita’s guide shows Claude Code using an Anthropic-compatible base URL with a Novita model ID:
export ANTHROPIC_BASE_URL="https://api.novita.ai/anthropic"
export ANTHROPIC_AUTH_TOKEN="<Novita API Key>"
export ANTHROPIC_MODEL="moonshotai/kimi-k2-instruct"
That gives you Claude Code ergonomics without locking every session to the same backend.
Practical Setup Patterns
Use this rule of thumb:
| Goal | Recommended setup |
|---|---|
| Maximum coding quality | claude --model fable |
| Best default for teams | claude --model sonnet |
| Fast iteration | claude --model haiku |
| Gateway-backed experimentation | ANTHROPIC_BASE_URL plus an explicit gateway model ID |
If you care about stable behavior across environments, pin the full model name instead of relying on aliases. If you care about cost and backend flexibility, keep the alias in your prompt workflow and move model choice into the environment.
For third-party deployments, use the current ANTHROPIC_DEFAULT_FABLE_MODEL, ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, and ANTHROPIC_DEFAULT_HAIKU_MODEL variables. Anthropic now treats ANTHROPIC_SMALL_FAST_MODEL as deprecated.
FAQ
What is the best Claude Code model for coding?
For most coding workloads, start with Sonnet 5. For harder agentic work, move to Opus 5.
Does Claude Code support only Claude models?
By default, Claude Code is built around Claude models. Through a gateway, the model catalog depends on the provider you connect to.
Can I use Novita AI with Claude Code?
Yes. Novita documents an Anthropic-compatible route that lets Claude Code point at Novita-hosted models.
Should I use Haiku 4.5 for real projects?
Yes, when the task is small enough. It is the fastest option, but it is not the best choice for deep multi-file reasoning.
Recommended Articles
- Claude Code vs Cursor: Which AI Coding Tool Should You Use in 2026?
- How to Use Kimi-K2 in Claude Code on Windows, Mac, and Linux
- What Is a Claude Coding Agent? How the Loop Works
Sources checked August 17, 2026: Anthropic Claude models overview, Claude Code model configuration, Novita AI Claude Code guide.
