Beta
Download

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.

TierAnthropicOpenAIInput / output per million tokens (October 22, 2026)
FrontierClaude 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
StrongClaude Sonnet 5.5GPT-6.1 Sol$2 / $10 for both
FastClaude Haiku 5.5GPT-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:

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 workStart withWhy (guidance)
Multi-file refactorFrontierAnthropic 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 failureFrontierAnthropic 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 screenshotFrontierAnthropic lists vision-heavy workflows under Opus 5.5, which reads screenshots more precisely than Opus 5.
Writing testsStrongCode generation with a clear target, which Anthropic lists under Sonnet 5.5. Move up when a test exposes a failure nobody can explain.
Code reviewStrong; frontier for large or risky diffsOpenAI describes GPT-6.1 Sol as near-Astra performance at a lower cost. Anthropic cites code review gains for Opus 5.5.
RenamesFastA mechanical, precisely described edit, which Anthropic gives to a smaller model. Renames across a public API are strong-tier work.
Commit messagesFastA summary of a diff already in context. OpenAI lists summarization among Luna's uses.
DocsFast for docstrings and changelogs; strong for design docsOpenAI suggests Luna for structured summaries; Anthropic lists content creation under Sonnet 5.5.
Shell commandsFast for one-liners; strong or frontier for long terminal tasksCodex 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:

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:

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