# Claude Code Model Selection Guide

> **Last verified**: 2026-11-18 (Claude, GPT-6.2, and Chinese model lists; the rest was last verified on 2026-11-12) · 📄 Per qcode.cc and Anthropic / OpenAI official docs (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 5.2 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](https://qcode.cc/models). As of 2026-11-18, 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](https://qcode.cc/models).

## Claude Model Family Overview

The Claude models currently available through QCode.cc form a capability ladder.

As of 2026-11-18, these Claude IDs are callable on QCode: `claude-fable-5-2`, `claude-fable-5-1`, `claude-fable-5`, `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`. For models added later, check /models.

### Claude Fable 5.2 — Top-Tier Flagship

Fable 5.2 (`claude-fable-5-2`) is the newest Fable release, published by Anthropic on 2026-11-09, and the most capable tier available today; the previous `claude-fable-5-1` is still available, and you can select it by its full model name.

- **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
- **Needs Claude Code v2.1.321 or later**: the docs state Fable 5.2 requires v2.1.321 (Fable 5.1 requires v2.1.257); run `claude update` if your version is older
- **Mostly drop-in from 5.1**: the official migration guide states the API surface matches Claude Fable 5.1, and nothing changes when Claude Code manages your conversation history
- **Official price (checked 2026-11-12)**: per million tokens, $8 for input, $40 for output and $0.20 for prompt cache reads; the previous Fable 5.1 is $10 / $50 / $0.25. On QCode, billing is per token, with per-model rates on [qcode.cc/models](https://qcode.cc/models)
- **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-5` or `ANTHROPIC_MODEL=claude-opus-5-5` (rates on [qcode.cc/models](https://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.5** (`claude-sonnet-5-5`): the new-generation balanced tier, 1M context / 128K output — the cheaper everyday choice 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 5.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
- **1M 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-5` as Haiku 5.5's model ID — run `/model claude-haiku-5-5` in a session, or start Claude Code with `claude --model claude-haiku-5-5`.
- **The `haiku` alias**: `haiku` is one of the model family aliases, alongside `opus`, `sonnet`, and `fable`; the docs describe it as the fast and efficient Haiku model for simple tasks. As of Claude Code v2.1.293, `haiku` resolves to Haiku 5.5 on the Anthropic API.
- **`ANTHROPIC_DEFAULT_HAIKU_MODEL`**: per the docs, this variable is the model to use for `haiku`, or for background functionality. The sibling variables `ANTHROPIC_DEFAULT_SONNET_MODEL`, `ANTHROPIC_DEFAULT_OPUS_MODEL`, and `ANTHROPIC_DEFAULT_FABLE_MODEL` control what the `sonnet`, `opus`, `haiku`, and `fable` aliases resolve to. Each value must be a full model name, or the equivalent identifier for your API provider. The older `ANTHROPIC_SMALL_FAST_MODEL` is deprecated in favor of `ANTHROPIC_DEFAULT_HAIKU_MODEL`.
- **Where a sub-agent's model comes from**: the docs resolve it in this order — first the per-invocation `model` parameter, then the subagent definition's `model` frontmatter (where `inherit` selects the main conversation's model), then the `CLAUDE_CODE_SUBAGENT_MODEL` environment variable, when you set it to a model alias or model ID, and finally the main conversation's model. A subagent's `model` field accepts `sonnet`, `opus`, `haiku`, `fable`, a full model ID such as `claude-opus-5-5`, or `inherit`, and a full model ID takes the same values as the `--model` flag — that is why `model: claude-haiku-5-5` is a documented form.
- **Pinning one model to every sub-agent**: `CLAUDE_CODE_SUBAGENT_MODEL` is 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 set `CLAUDE_CODE_SUBAGENT_MODEL_FORCE` to `1`, 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_MODEL` by 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 named `Explore`, which keeps its own `model` field — define one with `model: 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 through `ANTHROPIC_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:

```json
{
  "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](/docs/getting-started/endpoints-and-api-paths)). That variable changes where requests are sent, not which model answers them:

```bash
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](https://qcode.cc/models). For which clients speak the Anthropic protocol, see [Tool compatibility](/docs/ide/tool-compatibility).

## Detailed Model Comparison

| Dimension | Fable 5.2 | Opus 5.5 / 5 | Sonnet 5.5 / 5 | Sonnet 4.6 | Haiku 5.5 |
|--------|---------|----------|----------|------------|-----------|
| **Context window** | 1M | 1M | 1M | 1M (optional) | 1M |
| **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](https://qcode.cc/models).

## Scenario-Based Selection Guide

### Everyday Coding → Sonnet 5.5 / Sonnet 5

For day-to-day functions, components, APIs, and the like, Sonnet is more than enough:

```text
/model claude-sonnet-5-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.5

When system design and global decisions are involved, Opus's deep reasoning fits this kind of work:

```text
/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.2

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:

```text
/model claude-fable-5-2

> "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 5.5

For mechanical work that needs no deep thinking, Haiku is enough:

```text
/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.5

When reviewing large changes spanning many files, Opus catches deeper issues.

### Bug Fixes → Sonnet 5.5 / 5

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.5 / 5 | 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.2 | Top-tier reasoning firepower |
| One-off critical decisions | Fable 5.2 / 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:

```text
/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-5    # Switch by full model name
/model claude-fable-5-2
```

### Method 2: Environment Variable

Set a default model in your shell profile (e.g. `~/.bashrc` or `~/.zshrc`):

```bash
export ANTHROPIC_MODEL=claude-sonnet-5-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):

```markdown
## 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

```bash
claude --model claude-fable-5-2
claude --model claude-sonnet-5-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-11-18, these GPT IDs are callable on QCode: `gpt-6.2-sol`, `gpt-6.2-astra`, `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.2-sol** ⭐ | 1.05M | Flagship workhorse released 2026-11-17 (128K max output; OpenAI official API list price $2 input / $10 output per 1M tokens at ≤272K), default pick for everyday and complex coding; API rejects `reasoning_effort="none"` |
| **gpt-6.2-astra** | 1.05M | Top-tier flagship released 2026-11-17 (128K max output; OpenAI official API list price $8 input / $40 output per 1M tokens at ≤272K, 20% below `gpt-6-astra`), built for the hardest multi-step agentic and architecture tasks; API rejects `reasoning_effort="none"` |
| `gpt-6.1-sol` | 1.05M | GPT-6 Sol update released 2026-09-29, proven workhorse; 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` | 1.05M | Previous top-tier flagship |
| `gpt-5.6-terra` | 272K | GPT-5.6 flagship, coding / complex tasks |
| `gpt-5.6-sol` | 272K | GPT-5.6 flagship-series variant |

> QCode does not currently offer `gpt-6-luna` / `gpt-5.6-luna`, and OpenAI's official GPT-6.2 release exposes only `gpt-6.2-sol` and `gpt-6.2-astra` on the API (no mini / terra / luna / codex 6.2 variants).

> Live availability is shown on [qcode.cc/models](https://qcode.cc/models).

The same account can also call these Chinese model IDs: `qwen3.8-max`, `qwen3.8-flash`, `qwen3.7-plus`, `kimi-k3.1-pro`, `kimi-k3`, `deepseek-v4.1-flash`, `deepseek-v4-flash`, `deepseek-v4-pro`, `glm-5.3`, `glm-5.3-flash`. `qwen4-max` is not on QCode /models as of 2026-11-26 — check [qcode.cc/models](https://qcode.cc/models) before using it. See [Chinese Models](/docs/usage/cn-models) for setup details and /models for live availability.

### GPT Series Highlights

- **gpt-6.2-sol** is the new default recommendation since 2026-11-17 (1.05M context / 128K output, within 0.5 points of `gpt-6.2-astra` on FrontierCode 2.0 at `max`, matching `gpt-6.1-sol` at OpenAI's official API list price of $2 / $10); `gpt-6.1-sol` and `gpt-6-sol` remain available
- **gpt-6.2-astra** is the top-tier flagship released 2026-11-17 (1,318 Elo on AA-3D and +5.2 points over `gpt-6-astra` on Agents' Last Exam, at OpenAI's official API list price of $8 / $40), sitting alongside `claude-fable-5-2` for the hardest problems
- **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](https://qcode.cc/models))
- **gpt-6-astra** is the previous strongest tier; prefer `gpt-6.2-astra` for new workloads
- **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 (`https://api.qcode.cc/openai`) or OpenAI-compatible clients (`https://api.qcode.cc/openai/v1`) rather than Claude Code; the GPT series is worth trying when:

- **You want comparison testing**: run the same task through `claude-fable-5-2` / `claude-opus-5-5` and `gpt-6.2-astra` / `gpt-6.2-sol` to see which produces better results
- **Codex workflows**: Codex CLI users naturally use `gpt-6.2-sol`, `gpt-6.2-astra`, and other GPT models
- **Task fit**: mid- or light-tier GPT models (such as `gpt-6.1-terra`) or Chinese flagships (such as `qwen3.8-max`) suit high-throughput and cross-model comparison runs

```bash
# 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.2-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:

```text
Task allocation (reference):
├── Sonnet 5.5 / 5 (~70%) — everyday development, bug fixes, writing tests, reviews
├── Opus 5.5 / 5   (~13%) — architecture decisions, complex problems, large refactors
├── Fable 5.2      (~2%)  — critical decisions, long-unresolved stubborn bugs
└── Haiku 5.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:

1. **Wide blast radius**: the change touches multiple modules, systems, or teams
2. **One-off decisions**: architecture selection, tech-stack migration, and other decisions that are hard to walk back
3. **Long investigation**: the bug has resisted investigation for a long time and needs deeper analysis
4. **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.

```text
/model opus
> "Analyze the existing code architecture and draft an implementation plan for the permissions system"

/model claude-sonnet-5-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](https://qcode.cc/models); when in doubt, let real-world testing be the judge.