Claude Code Model Selection Guide
Choose a Claude model for Claude Code by task, plus GPT models via Codex CLI: callable model IDs, /model switching, scenarios; see qcode.cc/models (2026).
Need an API key? Sign up →Endpoints & base URLs →
On This Page
Last verified: 2026-10-20 · 📄 Per qcode.cc (models and rates on qcode.cc/models; billing on docs.qcode.cc)
Pick by task complexity and capability first: Sonnet for everyday coding, Opus for architecture and large-scale refactoring, Fable for the hardest unresolved problems, and Haiku for formatting and simple Q&A; then check live availability and per-model rates on qcode.cc/models. As of 2026-10-27, the Claude, GPT and other model IDs below are callable on QCode.
Claude Code supports several AI models, and each tier strikes a different balance between capability and speed. Choosing a tier by task complexity usually balances result quality and response time.
💰 Billing is per token; per-model rates are listed on qcode.cc/models.
Claude Model Family Overview¶
The Claude models currently available through QCode.cc form a capability ladder.
As of 2026-10-20, these Claude IDs are callable on QCode: claude-fable-5, claude-fable-5-1, claude-opus-5-5, claude-opus-5, claude-opus-4-8, claude-sonnet-5, claude-sonnet-5-5, claude-sonnet-4-6, claude-haiku-5-5. claude-haiku-4-5-20251001 and claude-sonnet-4-5-20250929 are marked Retired on /models (checked 2026-10-20); as of 2026-10-27 neither ID appears on qcode.cc/models any more, and both remain callable. For models added later, check /models.
Claude Fable 5 — Top-Tier Flagship¶
Fable 5 is the most capable tier available today:
- Strongest reasoning: built for the hardest problems — cross-system architecture, tricky concurrency/distributed bugs, one-off critical decisions
- 1M context / 128K output: whole-codebase understanding for large projects
- Reserve it for when it counts: routine tasks rarely need this tier
Best for: critical technical decisions, stubborn bugs that have resisted debugging, one-off tasks where output quality matters most.
Claude Opus 5.5 / 5 / 4.8 — Flagship Workhorse¶
Opus is the battle-tested flagship workhorse:
- Deep reasoning: long-chain logical reasoning, well suited to complex architecture design
- Code quality: generated code is more thorough, with better edge-case handling
- 1M context: strong at understanding large codebases
- Same window: Opus 5 and Opus 4.8 share the same context and output limits — swap freely
- Opus 5.5 (
claude-opus-5-5): the newest Opus release, now available on QCode; pick it with/model claude-opus-5-5orANTHROPIC_MODEL=claude-opus-5-5(rates on qcode.cc/models)
Best for: architecture design, large-scale refactoring, technical proposal evaluation, complex bug hunting.
Claude Sonnet 5 / Sonnet 4.6 — Everyday Balanced Tier¶
Sonnet is the daily driver for most developers, with a balance of capability and speed:
- Sonnet 5: the new-generation balanced tier, 1M context / 128K output — the recommended default for new projects
- Sonnet 4.6: mature and stable, 1M context (optional toggle), fully sufficient for everyday coding
- Balanced capability: steady quality for everyday coding and code review
- Faster: quicker than Opus, well suited to frequent back-and-forth
Best for: everyday coding, bug fixes, code review, documentation, writing tests.
Claude Haiku 4.5 — Light and Fast¶
Haiku is the smallest, fastest tier:
- Fastest speed: suited to frequent, short requests
- Solid basics: fully capable on simple tasks, limited on complex reasoning
- 200K context
Best for: simple Q&A, code formatting, boilerplate generation, quick translations.
Claude Haiku 5.5 — Light Tier for Sub-agents¶
Haiku 5.5 (claude-haiku-5-5) is available on QCode. In Claude Code it is the tier the haiku alias resolves to on the Anthropic API. The bullets below restate the official Claude Code documentation (the model configuration and sub-agents pages).
- Selecting it: the docs give
claude-haiku-5-5as Haiku 5.5's model ID — run/model claude-haiku-5-5in a session, or start Claude Code withclaude --model claude-haiku-5-5. - The
haikualias:haikuis one of the model family aliases, alongsideopus,sonnet, andfable; the docs describe it as the fast and efficient Haiku model for simple tasks. As of Claude Code v2.1.293,haikuresolves to Haiku 5.5 on the Anthropic API. ANTHROPIC_DEFAULT_HAIKU_MODEL: per the docs, this variable is the model to use forhaiku, or for background functionality. The sibling variablesANTHROPIC_DEFAULT_SONNET_MODEL,ANTHROPIC_DEFAULT_OPUS_MODEL, andANTHROPIC_DEFAULT_FABLE_MODELcontrol what thesonnet,opus,haiku, andfablealiases resolve to. Each value must be a full model name, or the equivalent identifier for your API provider. The olderANTHROPIC_SMALL_FAST_MODELis deprecated in favor ofANTHROPIC_DEFAULT_HAIKU_MODEL.- Where a sub-agent's model comes from: the docs resolve it in this order — first the per-invocation
modelparameter, then the subagent definition'smodelfrontmatter (whereinheritselects the main conversation's model), then theCLAUDE_CODE_SUBAGENT_MODELenvironment variable, when you set it to a model alias or model ID, and finally the main conversation's model. A subagent'smodelfield acceptssonnet,opus,haiku,fable, a full model ID such asclaude-opus-5-5, orinherit, and a full model ID takes the same values as the--modelflag — that is whymodel: claude-haiku-5-5is a documented form. - Pinning one model to every sub-agent:
CLAUDE_CODE_SUBAGENT_MODELis a default, so a subagent's definition or a model Claude passes still takes precedence. To apply one model to every subagent, the docs also have you setCLAUDE_CODE_SUBAGENT_MODEL_FORCEto1, which requires Claude Code v2.1.257 or later. - What the official docs do not state: they document no automatic routing of sub-agents onto a smaller model. A subagent with no model of its own inherits from the main conversation, and setting
CLAUDE_CODE_SUBAGENT_MODELby itself doesn't change the model the built-in Explore and Plan subagents run on. The documented way to move exploration onto this tier is a user or project subagent namedExplore, which keeps its ownmodelfield — define one withmodel: haiku. - Context window: on the Anthropic API, Haiku 5.5 runs with the 1M context window on every plan, with no
[1m]suffix to select. Behind a gateway configured throughANTHROPIC_BASE_URL, Claude Code gives each model it recognizes the same context window the model has on the Anthropic API, and it can't detect a lower limit that the gateway or the server behind it enforces.
The docs' own example for running every subagent on Haiku sets both variables in the env block of a settings file:
{
"env": {
"CLAUDE_CODE_SUBAGENT_MODEL": "haiku",
"CLAUDE_CODE_SUBAGENT_MODEL_FORCE": "1"
}
}
On QCode, claude-haiku-5-5 is served on the Anthropic-protocol endpoint, so point Claude Code at https://api.qcode.cc/api (see Endpoints and API paths). That variable changes where requests are sent, not which model answers them:
export ANTHROPIC_BASE_URL="https://api.qcode.cc/api"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-5-5"
export CLAUDE_CODE_SUBAGENT_MODEL="claude-haiku-5-5"
Billed per token; per-model rates are listed on qcode.cc/models. For which clients speak the Anthropic protocol, see Tool compatibility.
Detailed Model Comparison¶
| Dimension | Fable 5 | Opus 5 / 4.8 | Sonnet 5 | Sonnet 4.6 | Haiku 4.5 |
|---|---|---|---|---|---|
| Context window | 1M | 1M | 1M | 1M (optional) | 200K |
| Reasoning | Best-in-class | Excellent | Strong | Strong | Basic |
| Code quality | Best-in-class | Excellent | High | High | Moderate |
| Response speed | Slower | Slower | Medium | Medium | Fast |
Billing is per token; per-model rates are listed on qcode.cc/models.
Scenario-Based Selection Guide¶
Everyday Coding → Sonnet 5 / Sonnet 4.6¶
For day-to-day functions, components, APIs, and the like, Sonnet is more than enough:
/model claude-sonnet-5
> "Add a deleteUser method to @src/services/user-service.ts"
> "Create a Pagination component with previous/next buttons and jump-to-page support"
> "Add pagination parameter support to @src/app/api/orders/route.ts"
Architecture Design / Large-Scale Refactoring → Opus 5¶
When system design and global decisions are involved, Opus's deep reasoning fits this kind of work:
/model opus
> "Analyze the overall architecture under @src/. I plan to split this monolith into microservices.
Evaluate which modules are good candidates for extraction and propose a split plan."
Critical Decisions / Stubborn Bugs → Fable 5¶
For bugs you have been chasing for ages without a lead, or far-reaching one-off technical decisions, the top tier is the right pick:
/model claude-fable-5
> "I've spent three days on this intermittent data inconsistency issue. Symptoms, logs, and repro steps below...
Systematically analyze all possible root causes and propose a verification plan."
Code Formatting / Simple Q&A → Haiku 4.5¶
For mechanical work that needs no deep thinking, Haiku is enough:
/model haiku
> "Add JSDoc comments to all interfaces in @src/types/index.ts"
> "What does this ESLint error mean: no-unused-vars"
Large PR Reviews → Opus 5¶
When reviewing large changes spanning many files, Opus catches deeper issues.
Bug Fixes → Sonnet 5 / 4.6¶
Sonnet handles most bug fixes just fine; for especially complex bugs involving concurrency or distributed systems, switch up to Opus or Fable.
Quick Reference by Scenario¶
| Task type | Recommended model | Why |
|---|---|---|
| Write a function/component | Sonnet 5 / 4.6 | Balanced capability and speed |
| Architecture design | Opus | Needs deep reasoning |
| Refactoring (large-scale) | Opus | Needs whole-codebase understanding |
| Bug fixes | Sonnet | Most bugs don't need Opus |
| Stubborn bugs (long unresolved) | Fable 5 | Top-tier reasoning firepower |
| One-off critical decisions | Fable 5 / Opus | Decision quality comes first |
| Writing tests | Sonnet | Test logic is fairly straightforward |
| Code review | Sonnet/Opus | Sonnet for simple PRs, Opus for large ones |
| Code formatting | Haiku | Mechanical work |
| Adding comments/docs | Haiku/Sonnet | Haiku for simple comments, Sonnet for complex docs |
| Simple Q&A / translation | Haiku | Answerable in a sentence or two |
How to Switch Models¶
Method 1: The /model Command (Recommended)¶
Switch anytime inside Claude Code; it takes effect immediately:
/model # Show the current model and available options
/model sonnet # Switch to Sonnet
/model opus # Switch to Opus
/model haiku # Switch to Haiku
/model claude-sonnet-5 # Switch by full model name
/model claude-fable-5
Method 2: Environment Variable¶
Set a default model in your shell profile (e.g. ~/.bashrc or ~/.zshrc):
export ANTHROPIC_MODEL=claude-sonnet-5
# Or specify it one-off at launch
ANTHROPIC_MODEL=claude-opus-5-5 claude
Method 3: Configure in CLAUDE.md¶
Give Claude some model-usage guidance in your project's CLAUDE.md (note these are suggestions, not hard configuration):
## Model Usage Suggestions
- Use Sonnet for everyday development
- Switch to Opus to evaluate the design before architecture changes
- Use Haiku for bulk comment additions
Method 4: Launch Flags¶
claude --model claude-fable-5
claude --model claude-sonnet-5
claude --model claude-haiku-5-5
GPT and Codex Models (via QCode.cc)¶
Through QCode.cc's relay service, the same API key also gives you access to GPT-series models.
As of 2026-10-27, these GPT IDs are callable on QCode: gpt-6.1-sol, gpt-6.1-terra, gpt-6-sol, gpt-6-astra, gpt-5.6-terra, gpt-5.6-sol.
Available Models¶
| Model | Context | Recommended for |
|---|---|---|
| gpt-6.1-sol ⭐ | 1.05M | GPT-6 Sol update released 2026-09-29, default recommendation; no none / minimal reasoning effort |
gpt-6.1-terra |
1.05M | Mid-tier GPT-6.1; unit price about half that of gpt-6.1-sol (see /models), for everyday coding / batch tasks |
gpt-6-sol |
1.05M | GPT-6 flagship |
gpt-6-astra |
see qcode.cc/models | Strongest tier |
gpt-5.6-terra |
272K | GPT-5.6 flagship, coding / complex tasks |
gpt-5.6-sol |
272K | GPT-5.6 flagship-series variant |
GPT-6 Luna (gpt-6-luna / gpt-5.6-luna) is currently not supported. Please use another GPT model.
Live availability is shown on qcode.cc/models.
The same account can also call these IDs as of 2026-10-20: deepseek-v4.1-flash, deepseek-v4-flash, deepseek-v4-pro, glm-5.3, glm-5.3-flash, glm-5.2, qwen3.8-flash, qwen3.8-max, qwen3.7-plus, kimi-k3. For availability of these models, check /models.
GPT Series Highlights¶
- gpt-6.1-sol is the current default recommendation (the GPT-6 Sol update), with 1.05M context;
gpt-6-solremains available - gpt-6.1-terra is the mid-tier GPT-6.1 option, with a unit price about half that of
gpt-6.1-sol; suited to everyday coding and batch tasks (rates on qcode.cc/models) - gpt-6-astra is the strongest tier
- gpt-5.6-terra remains a strong workhorse for coding and Codex CLI scenarios
- gpt-5.6-sol is a same-tier GPT-5.6 variant with comparable capability
When to Consider Non-Claude Models¶
In most cases, Claude models are the best choice for Claude Code (native fit). GPT models run in Codex CLI rather than Claude Code; the GPT series is worth trying when:
- You want comparison testing: run the same task through different models and see which produces better results
- Codex workflows: Codex CLI users naturally use the GPT series
- Task fit: lightweight GPT models suit simple tasks
# GPT models are not on the Anthropic protocol: /model gpt-* is rejected inside Claude Code
# To use GPT, go through Codex CLI (the OpenAI Responses / Chat protocols)
codex --model gpt-6.1-sol "Refactor this module"
Note: non-Claude models may not support certain features in Claude Code (such as parts of Extended Thinking). We recommend Claude models as your primary choice, with other models as a supplement.
Allocating Models by Task Complexity¶
A Mixed-Tier Approach¶
A common split follows task complexity:
Task allocation (reference):
├── Sonnet 5 / 4.6 (~70%) — everyday development, bug fixes, writing tests, reviews
├── Opus 5 / 4.8 (~13%) — architecture decisions, complex problems, large refactors
├── Fable 5 (~2%) — critical decisions, long-unresolved stubborn bugs
└── Haiku 4.5 (~15%) — formatting, simple Q&A, bulk operations
This keeps everyday work on the balanced tier and moves to a higher tier when it matters.
When to Move Up a Tier¶
Switch to Opus, or even Fable, when a task meets any of these conditions:
- Wide blast radius: the change touches multiple modules, systems, or teams
- One-off decisions: architecture selection, tech-stack migration, and other decisions that are hard to walk back
- Long investigation: the bug has resisted investigation for a long time and needs deeper analysis
- Code quality is critical: the code will be called from many places and needs to be robust
Conversely, for internal tooling, style tweaks, or adding comments, Sonnet or even Haiku is plenty.
Practical Tips¶
Switch Models Mid-Conversation¶
You can switch models partway through a conversation: draft the plan with Opus/Fable first, then switch to Sonnet to execute once it's confirmed — top-tier reasoning for the critical decisions, and the balanced tier for execution.
/model opus
> "Analyze the existing code architecture and draft an implementation plan for the permissions system"
/model claude-sonnet-5
> "Following the plan above, start on step one: create the permission model"
Check Task Usage with /cost¶
After finishing a task, use /cost to see the token usage for that run. Next time you tackle a similar task, try a different model and compare the result and the usage; after a few rounds you'll have an intuition for which tier fits which kind of task.
Model Capabilities Keep Evolving¶
The capability descriptions on this page reflect the relative standing of current versions. New model launches and retirements are always reflected at qcode.cc/models; when in doubt, let real-world testing be the judge.
Get started with QCode
One API key for Claude Code, Codex and more — billed per token, per-model prices on qcode.cc/models