Which model to use for which coding task
AutoRouter8 min read
Match the model to how hard the task is. Anthropic and OpenAI each sell a frontier, a strong and a fast model. Read against their own guidance as of October 22, 2026, multi-file refactors, hard failures and UI built from a design belong on the frontier tier, tests and code review on the strong tier, and renames, commit messages and one-line shell commands on the fast tier. On shorter prompts the fast tier costs a fortieth of Claude Opus 5.5 per token and a hundredth of GPT-6 Astra. AutoRouter, the Mac app for Codex and Claude Code, makes the choice on every turn inside the model picker you already use.
Which models are frontier, strong and fast?
Claude Opus 5.5 and GPT-6 Astra are the frontier tier, Claude Sonnet 5.5 and GPT-6.1 Sol the strong tier, and Claude Haiku 5.5 and GPT-6 Luna the fast tier. The grouping is this post's, built from each maker's descriptions and list prices on October 22, 2026.
| Tier | Anthropic | OpenAI | Input / output per million tokens (October 22, 2026) |
|---|---|---|---|
| Frontier | Claude Opus 5.5 (Claude Fable 5.1 sits above it) | GPT-6 Astra | $4 / $20 for Opus 5.5; $10 / $50 for Fable 5.1 and GPT-6 Astra |
| Strong | Claude Sonnet 5.5 | GPT-6.1 Sol | $2 / $10 for both |
| Fast | Claude Haiku 5.5 | GPT-6 Luna | $0.10 / $0.50 for both, on Haiku 5.5 prompts up to 100,000 tokens and Luna inputs up to 272,000 tokens |
What do Anthropic and OpenAI recommend for coding?
Both makers say to start with the top model when you are unsure, then move work down a tier once a cheaper model holds up on it. Anthropic's models overview starts most workloads on Claude Opus 5.5, and OpenAI's API models page starts on GPT-6 Astra. Their more specific guidance, as of October 22, 2026:
- Anthropic's selection matrix lists large-scale refactoring under Opus 5.5, code generation under Sonnet 5.5 and subagent tasks under Haiku 5.5.
- Claude Code's cost guide says Sonnet handles most coding tasks well, reserves Opus for complex architectural decisions and multi-step reasoning, and gives simple subagent tasks
model: haiku. - Anthropic's guide to model and effort in Claude Code (July 7, 2026) gives subtle bugs and architecture decisions to a larger model, and mechanical, precisely described edits to a smaller one.
- OpenAI's Codex models page points complex coding to GPT-6.1 Sol, keeps Astra for the hardest end-to-end work, and suggests Light reasoning effort for quick, well-scoped tasks.
- OpenAI's model selection guide pairs Luna at Low effort with small edits, and says to keep the lightest setting that meets your quality bar.
Which tier fits each kind of coding work?
Work that spans files, hides its cause or starts from an image belongs on the frontier tier, and work you could describe in one sentence belongs on the fast tier. Each row is guidance drawn from the sources above and the benchmarks below, so test it against your own repository.
| Kind of work | Start with | Why (guidance) |
|---|---|---|
| Multi-file refactor | Frontier | Anthropic lists large-scale refactoring under Opus 5.5. SWE-Bench Pro reports resolve rates falling as changes grow in lines and files. |
| Debugging a hard failure | Frontier | Anthropic gives subtle bugs to a larger model, and Claude Code names root-cause investigations as work for its top model. |
| UI from a design or screenshot | Frontier | Anthropic lists vision-heavy workflows under Opus 5.5, which reads screenshots more precisely than Opus 5. |
| Writing tests | Strong | Code generation with a clear target, which Anthropic lists under Sonnet 5.5. Move up when a test exposes a failure nobody can explain. |
| Code review | Strong; frontier for large or risky diffs | OpenAI describes GPT-6.1 Sol as near-Astra performance at a lower cost. Anthropic cites code review gains for Opus 5.5. |
| Renames | Fast | A mechanical, precisely described edit, which Anthropic gives to a smaller model. Renames across a public API are strong-tier work. |
| Commit messages | Fast | A summary of a diff already in context. OpenAI lists summarization among Luna's uses. |
| Docs | Fast for docstrings and changelogs; strong for design docs | OpenAI suggests Luna for structured summaries; Anthropic lists content creation under Sonnet 5.5. |
| Shell commands | Fast for one-liners; strong or frontier for long terminal tasks | Codex suggests Light effort for quick, well-scoped tasks. On Terminal-Bench 4.0 at max effort, GPT-6 Luna resolved 16.4% of tasks and GPT-6 Astra 58.2% (October 22, 2026). |
What do coding benchmarks say about the tiers?
On Terminal-Bench 4.0, a public leaderboard of long terminal tasks that lists the current models, the strong tier scores close to the frontier tier and the fast tier scores far below both. As of October 22, 2026, Claude Opus 5.5 in Claude Code at max effort resolved 64.8% of tasks (plus or minus 3.1 points at 95% confidence) and Claude Sonnet 5.5 resolved 61.8%. In Codex at max effort, GPT-6 Astra and GPT-6.1 Sol both resolved 58.2%. Claude Haiku 5.5 has no entry.
The same board shows that a lower price per token doesn't always mean a cheaper task. Sonnet 5.5's run used 19.4 billion tokens at a listed cost of $7,334, against 8.0 billion tokens and $4,719 for Opus 5.5. GPT-6.1 Sol matched GPT-6 Astra's score for $634 against $3,267. Read any leaderboard with these caveats:
- Each entry is one model in one agent at one effort level. GPT-6 Astra in Codex scores 58.2% at max effort and 50.6% at low effort on the same board.
- OpenAI stopped reporting SWE-bench Verified on February 23, 2026, citing flawed tests and training-data contamination, and recommended SWE-bench Pro.
- Leaderboards lag releases. As of October 22, 2026, Scale's SWE-Bench Pro public leaderboard lists no Claude 5.5 or GPT-6 entry.
- AutoRouter publishes no benchmarks of its own.
How do you choose the model yourself in Claude Code and Codex?
Switch with /model in either app, and set separate models for planning or reviews. In Claude Code, the opusplan alias uses Opus in plan mode and Sonnet for execution. In Codex, review_model in ~/.codex/config.toml sets the model /review uses:
model = "gpt-6-astra"
review_model = "gpt-6.1-sol"
Switching mid-conversation has a cost. On the Claude API, Claude Opus 5.5's reasoning carries over only to Claude Fable 5.1 and Claude Mythos 5.1, so after any other switch the later turns run without it. For subagents, one-off commands and profiles that move quick work to a small model, see how to send quick coding tasks to a cheaper model.
How does AutoRouter choose a model for each task?
AutoRouter, the Mac app for Codex and Claude Code, works out how hard each turn is and only considers models that clear the quality bar for it. Hard work goes to the most capable model your plans cover, and everything else goes to the model that costs you least, which is often your plan or a low-cost open model. Unclear work is never treated as a quick task. How AutoRouter picks a model covers the full order. The landing page's examples line up with the table above; they are illustrations, and real routes follow your plans and rules:
- A change across six files goes to Claude Opus 5.5 on the Claude plan.
- A test that only fails on CI is hard, so it goes to GPT-6 Astra on the ChatGPT plan.
- A commit message is quick work, so a low-cost open model writes it and the plan isn't touched.
- A rule sends UI work to Claude Opus 5.5.
You can write rules in plain English, such as "Use Claude Opus 5.5 for UI work." or "Prefer GPT-6.1 Sol for code reviews." Your rules come before AutoRouter's recommended ones. Every turn shows its model, what it cost and why. In Codex, OpenAI models run on the ChatGPT plan; in Claude Code, Claude models run on the Claude plan. Pick AutoRouter from the model menu in Codex, or with /model in Claude Code, and choose a specific model in the picker whenever you want it. AutoRouter wrote this post.
Questions
Is Claude Opus 5.5 worth it over Claude Sonnet 5.5 for coding?
Claude Opus 5.5 is worth it for multi-file, ambiguous or long-running work, and Claude Code's docs say Sonnet handles most other coding well. Opus 5.5 costs twice as much per token as of October 22, 2026, yet its Terminal-Bench 4.0 run at max effort used fewer tokens than Sonnet 5.5's and cost less in total. Test both on a task you repeat often.
When is a cheaper model good enough for coding?
A cheaper model is good enough when you could describe the edit in one sentence and check the result at a glance: a rename, a commit message, a one-line command or a docstring. Claude Code's docs describe the haiku alias as the model for simple tasks, and OpenAI pairs GPT-6 Luna at Low effort with small edits.
Should I raise the effort or switch to a bigger model?
Raise the effort when the model skipped a file, didn't run the tests or didn't check its work. Switch to a bigger model when it had all the context and still got it wrong. That is the test in Anthropic's July 7, 2026 guide to model and effort in Claude Code.
Does sending easy tasks to a smaller model hurt quality?
It can when a task is harder than it looks, which is why both makers suggest testing on your own work before moving it down a tier. AutoRouter never treats unclear work as a quick task, and you can rate a pick that falls short. Does model routing hurt quality? has more.
Sources
- Models overview, Claude Platform docs, Anthropic
- Choosing the right model, Claude Platform docs, Anthropic
- Pricing, Claude Platform docs, Anthropic
- What's new in Claude Opus 5.5, Claude Platform docs, Anthropic
- Manage costs effectively, Claude Code docs, Anthropic
- Model configuration, Claude Code docs, Anthropic
- Choosing a Claude model and effort level in Claude Code, Anthropic, July 7, 2026
- Models, Codex docs, OpenAI
- Configuration reference, Codex docs, OpenAI
- Models, OpenAI API docs
- Model selection, OpenAI API docs
- API pricing, OpenAI
- Why we no longer evaluate SWE-bench Verified, OpenAI, February 23, 2026
- Terminal-Bench 4.0 leaderboard, Terminal-Bench
- SWE-Bench Pro public leaderboard, Scale AI