Scenario-based coding model guide

Choose the Best LLM for Your Coding Workflow

Stop asking which model is best in general. Pick the model that fits the job: coding agents, repo refactors, frontend generation, code review, test generation, Chinese coding workflows, or budget-sensitive automation.

Best for workflow · Evidence visible · Caveats included · Cost estimate next
short answer

The best coding LLM depends on the job.

The right choice depends on workflow, public benchmark evidence, API pricing, context needs, retry risk, and output length. Use this page to shortlist models by scenario, then compare source-backed rows and estimate task cost before committing to a model.

scenario cards

Best LLM for coding agents, refactors, frontend generation, and low-cost automation

Best for coding agents

Candidates for multi-step coding-agent loops need public coding evidence, visible retry caveats, and source-backed token pricing where available.

This is a shortlist label, not a universal winner. Estimate task cost before committing to a default model.

Compare candidates

Best for repo-level refactor

Repo-level refactor and code review need editing evidence, context caution, and visible source freshness before cost comparison.

Advertised context is not the same as reliable long-context repo editing.

Compare candidates

Best for frontend generation

Frontend generation needs coding evidence plus human inspection of UI output, follow-up rate, and implementation cost.

Preference or coding scores do not guarantee pixel-perfect UI. Treat the label as a workflow lens.

Compare candidates

Cheapest good-enough candidates

Low-cost automation starts with token price, then checks benchmark coverage, retry rate, cache behavior, and cleanup cost.

Do not call a model cheapest overall unless task assumptions are visible.

Compare candidates

Best Chinese coding workflow candidates

Kimi, Qwen, DeepSeek-style rows can be useful when the page separates pricing, benchmark coverage, context, and unknown fields.

Partial evidence is acceptable. Fake certainty is not.

Compare candidates
evidence table intro

Use evidence before recommendation labels

Use the evidence table to see what supports each recommendation. The table should show benchmark/source, price availability, context status, data status, confidence, caveat, and calculator handoff. Recommendations can be reordered as data improves, but unsupported claims should not be shipped.

Anthropic

Claude Opus 4.5

partial
76.80%SWE-bench Verified
SWE-bench Leaderboards · checked 2026-06-02
$5input / 1M$25output / 1Mnot disclosedcontext
Coding agentsRepo refactorCode review

Strong SWE-bench evidence in captured source, but expensive output pricing; do not present as universal best model.

Pricing source: Anthropic Claude API pricing · checked 2026-06-02 · confidence high
Benchmark source: SWE-bench Leaderboards · checked 2026-06-02 · confidence medium

Calculate This Model’s Task Cost
Anthropic

Claude Sonnet 4.5

partial
71.40%SWE-bench Verified
SWE-bench Leaderboards · checked 2026-06-02
$3input / 1M$15output / 1Mnot disclosedcontext
Coding agentsFrontend generationRepo refactorTest generation

Good candidate for default coding workflow shortlist, but scenario label must cite benchmark and price fields rather than claim overall superiority.

Pricing source: Anthropic Claude API pricing · checked 2026-06-02 · confidence high
Benchmark source: SWE-bench Leaderboards · checked 2026-06-02 · confidence medium

Calculate This Model’s Task Cost
Anthropic

Claude Haiku 4.5

partial
66.60%SWE-bench Verified
SWE-bench Leaderboards · checked 2026-06-02
$1input / 1M$5output / 1Mnot disclosedcontext
Low-cost automationTest generationBug fixing

Lower token price does not guarantee lower task cost if retry rate rises; calculator must expose retry assumptions.

Pricing source: Anthropic Claude API pricing · checked 2026-06-02 · confidence high
Benchmark source: SWE-bench Leaderboards · checked 2026-06-02 · confidence medium

Calculate This Model’s Task Cost
OpenAI

GPT-5.4 mini

partial evidence
not publicly benchmarkedSWE-bench Verified
SWE-bench Leaderboards exact alias recheck · checked 2026-06-05
$0.75input / 1M$4.5output / 1Mnot disclosedcontext
Low-cost automationTest generation

OpenAI API pricing is source-backed for GPT-5.4 mini standard short-context pricing. Exact public coding benchmark for this alias is not verified, so benchmark evidence is marked not publicly benchmarked.

Pricing source: OpenAI API pricing · checked 2026-06-02 · confidence high
Benchmark source: SWE-bench Leaderboards exact alias recheck · checked 2026-06-05 · confidence low

Calculate This Model’s Task Cost
methodology

No fake universal score

Benchmarks stay separate

This leaderboard does not combine SWE-bench, Aider, LiveCodeBench, arena scores, pricing tables, and usage signals into one fake universal score.

Official pricing preferred

Pricing data prefers official provider pages. Aggregator or route-specific pricing must be labeled before it is used for a calculator prefill.

Speed stays unknown without a source

TTFT and tokens/sec only ship when a public source exists for the exact model or route. Otherwise speed is not disclosed.

Task cost is computed from assumptions

A cheaper token price can become expensive if retries, output length, cache behavior, or failure cleanup change the workflow.

calculator bridge

Found a candidate model?

Open the calculator with this model prefilled and test your own workflow assumptions: input tokens, output tokens, retry rate, cache hit rate, and monthly task volume.

What is the best LLM for coding?

There is no single best LLM for every coding task. The best choice depends on your workflow, benchmark evidence, price, context, retry risk, and output length. Use scenario labels such as best for coding agents, best for refactor, or cheapest good-enough.

Which LLM should I use for a coding agent?

Start with models that have public coding evidence, reliable context behavior, visible caveats, and source-backed pricing. Then estimate the cost of your agent loop. Agent tasks can become expensive through retries, tool calls, long outputs, and failed trajectories.

What is the cheapest LLM for coding?

The cheapest LLM for coding depends on task complexity and retry rate. A low price per million tokens can be attractive, but the real cost depends on how many prompts, outputs, retries, cache reads, and human corrections the workflow needs.

How should I compare Claude, GPT, Gemini, DeepSeek, Kimi, and Qwen for coding?

Compare them by workflow and source coverage. Separate API token pricing from subscription-tool pricing, keep benchmark sources separate, mark unknown fields, and avoid forcing all models into one absolute winner list.

Browse all guides

Compare pricing, limits, and workflow fit