Cheapest LLM for Coding in November 2026: Which Cheap Models Are Still Reliable
The cheapest LLM that can reliably handle coding requests in November 2026 is Claude Haiku 5.5: $0.10 per million input tokens and $0.50 per million output tokens, and far ahead of the other $0.10 model, GPT-6 Luna, on agent-style coding tests. If you want open weights, DeepSeek V4.1-Flash costs $0.15 / $0.60 off-peak. If the work has to land without much hand-holding, GPT-6.2 Sol at $2 / $10 is the best value: it scores 57 on the Artificial Analysis Intelligence Index, level with last generation’s $10 / $50 flagship.
Price per token is only half the answer. In Artificial Analysis’s Terminal-Bench 4.0 runs, Haiku 5.5 passed 33% of tasks and GPT-6 Luna, at the identical price, 13%; Claude Sonnet 5.5 ($2 / $10) passed 64%. And two models with the same $2 / $10 price differed nearly eightfold in what one finished task cost. Below: the price table, a pick for each coding job, the per-task math, five ways to cut the bill, and what to buy if you would rather pay a flat fee under $100 a month.

- Cheapest that still codes
- Haiku 5.5 · $0.10 / $0.50
- Cheapest open weights
- DeepSeek V4.1-Flash · $0.15 / $0.60
- Best value for real work
- GPT-6.2 Sol · $2 / $10
- Same price, very different result
- Terminal-Bench: Haiku 33%, Luna 13%
Prices and coding scores side by side
Standard API rates in USD per 1 million tokens, checked on the providers’ pricing pages on November 20, 2026. Makers publish different coding tests, so each score names its test and who ran it. AA = Artificial Analysis, which runs every model through the same harness.
| Model | Input / output | Cached input | Coding score (test, who ran it) | Cost per task* | Source |
|---|---|---|---|---|---|
| GPT-6 Luna | $0.10 / $0.50 | $0.01 | 13% Terminal-Bench 4.0 (AA) | $0.15 | OpenAI, AA |
| Claude Haiku 5.5 | $0.10 / $0.50 (prompts ≤100K); $0.50 / $2.50 above | $0.01 | 33% Terminal-Bench 4.0 (AA); 64.8% SWE-bench Pro (Anthropic, max effort) | $0.41 | Anthropic, AA |
| GLM-5.3-Flash | $0.15 / $0.50 | — | 33% Terminal-Bench 4.0 (AA) | — | GrandLinux, AA |
| DeepSeek V4.1-Flash (open weights) | $0.15 / $0.60 off-peak; $0.30 / $1.20 peak | $0.003 off-peak | 31.2% Terminal-Bench 4.0; 74.2 DeepSWE v1.1 (DeepSeek’s own runs) | $0.60 | DeepSeek, VentureBeat |
| Gemini 3.8 Flash | $0.75 / $3.75, rising to $1.50 / $7.50 on Jan 1 | $0.075 | 20% Terminal-Bench 4.0 (AA) | — | Google, AA |
| Gemini 4 Hydrogen | $1.50 / $7.50 | $0.075 | 57% Terminal-Bench 4.1 (Google’s table) | $1.87 (high) | Google, eesel |
| GPT-6.2 Sol | $2 / $10 | $0.10 | AA Coding Agent Index 3 points below GPT-6.1 Sol (52 in Codex) | Not yet published (GPT-6.1 Sol: $1.27) | OpenAI, AA |
| Claude Sonnet 5.5 | $2 / $10 | $0.10 | 64% Terminal-Bench 4.0 (AA); 81.3% SWE-bench Pro (Anthropic) | $10.02 | Anthropic, AA |
| Kimi K3.1 Pro (open weights) | $2 / $10 | $0.20 | 68% Terminal-Bench 4.1 in Kimi Code CLI (AA) | $3.68 | Apidog, AlphaSignal |
*Cost per task is the average cost of one Artificial Analysis Intelligence Index task at maximum effort (index v5.0.1, as reported November 10), so it mixes coding and non-coding tasks. Hydrogen’s figure is at its default high reasoning level. “—” means not published in our sources. Batch prices are half of the rates above at Anthropic, OpenAI and Google.
Read the table in pairs. Haiku 5.5 and GPT-6 Luna cost the same, but Haiku passes more than twice as many terminal coding tasks. GPT-6.1 Sol, Kimi K3.1 Pro and Sonnet 5.5 all list at $2 / $10, yet one index task cost $1.27, $3.68 and $10.02 respectively. For every major model on one page, including the frontier tier, see our AI model API pricing comparison.
The cheapest model that works, by coding job
| Job | Start with | Step up to | Why |
|---|---|---|---|
| Autocomplete | Your editor’s bundled tab model (Copilot, Cursor) | — | Copilot Pro includes unlimited completions for $10 a month |
| Everyday coding chat | Claude Haiku 5.5 at medium effort, or free Gemini 4 Hydrogen | GPT-6.2 Sol | Haiku beats Luna on every coding row Anthropic published |
| Agentic multi-file edits | GPT-6.2 Sol | Claude Sonnet 5.5 | Sonnet: 64% Terminal-Bench 4.0 (AA), 81.3% SWE-bench Pro |
| Code review on every PR | Haiku 5.5 via Batch ($0.05 / $0.25) | Sonnet 5.5 on flagged PRs | About $2 per 1,000 reviews |
| Code can’t leave your servers | DeepSeek V4.1-Flash (MIT licence) | Kimi K3.1 Pro (open weights) | No per-token bill; you pay for GPUs instead |
Autocomplete
Autocomplete fires on nearly every keystroke, so a per-token API is the wrong tool unless you are building an editor. GitHub Copilot Free includes 2,000 completions a month and Copilot Pro ($10) makes them unlimited. If you are building your own completion feature, test GPT-6 Luna and Haiku 5.5 at low effort first: both cost $0.10 / $0.50, and short completion prompts stay far below Haiku’s 100K-token price step.
Everyday coding chat
Explaining an error, writing one function, drafting a test: Haiku 5.5 handles this for fractions of a cent. In Anthropic’s launch table at max effort it scored 64.8% on SWE-bench Pro and 46.4% on FrontierCode 1.1, against GPT-6 Luna’s 42.4%. Don’t run it at max by default. One hands-on test found it solved 8 of 8 coding tasks at low, medium and high effort but 7 of 8 at max, and Artificial Analysis measured about 162K output tokens per task at max, roughly three times Luna.
If you want to pay nothing, Gemini 4 Hydrogen has a free API tier (Google may use free-tier data to improve its products) and scored 57% on Terminal-Bench 4.1 in Google’s own table.
Agentic multi-file edits
This is where cheap models fall apart: an agent that edits five files, runs the tests and reads the output has to stay on track for dozens of steps. GPT-6.2 Sol is the cheapest model we would let do that unattended. OpenAI reports it within 0.5 points of GPT-6.2 Astra on FrontierCode 2.0, and its predecessor GPT-6.1 Sol scored 52 on Artificial Analysis’s Coding Agent Index in Codex at $1.51 per task. One caution: AA measured GPT-6.2 Sol 3 points below 6.1 Sol on that index, mostly from a drop in answering questions about code.
When Sol keeps failing, step up to Claude Sonnet 5.5 rather than straight to a frontier model. It scored 64% on Terminal-Bench 4.0 in AA’s run and 56 on the Coding Agent Index in Claude Code at max effort, close to Claude Fable 5.2’s 58 at a quarter of Fable’s token price. Run it at medium: one tester found medium matched high at about half the output tokens. For the frontier picks, see our best AI for coding ranking.
Code review
Review is input-heavy and rarely urgent, which makes it the best fit for a cheap model plus the Batch API. Haiku 5.5 in Anthropic’s Batch API costs $0.05 / $0.25 per million tokens: at 30K input and 2K output tokens per pull request, 1,000 reviews cost about $2, against about $40 on Sonnet 5.5 or GPT-6.2 Sol in batch. Reasoning tokens bill as output, so measure your own counts. Let Haiku flag problems on every PR and send only the flagged ones to Sonnet.
If your bot answers questions about the codebase (“where is this configured?”), test GPT-6.2 Sol carefully: its score on SWE-Atlas-QnA, AA’s code question-answering test, fell 14 points from GPT-6.1 Sol.
Code that can’t leave your servers
DeepSeek V4.1-Flash ships open weights under the MIT licence with a 1M-token context window, and DeepSeek reports 74.2 on DeepSWE v1.1 and 31.2% on Terminal-Bench 4.0 in its own runs. Kimi K3.1 Pro is the stronger open-weight coder (68% on Terminal-Bench 4.1 in Kimi Code CLI, per AA) and costs $2 / $10 through Moonshot’s API. Self-hosting swaps the token bill for a GPU bill, so it pays off only at steady, high volume or when data rules require it.
If most of your requests are questions over documents rather than code, the trade-offs are different; see our guide to economical LLMs for RAG.
Why the cheapest token isn’t the cheapest task
What a coding task really costs is price per token × tokens per task × attempts, and models differ wildly on the last two. Artificial Analysis publishes what one task in its index costs each model:
- Same price, about 8x the cost. GPT-6.1 Sol and Claude Sonnet 5.5 both list at $2 / $10 and scored the same (55), but Sol cost $1.27 per task and Sonnet $10.02, because Sonnet used far more tokens.
- Cheaper tokens, pricier task. GLM-5.3 lists at $1.40 / $4.40, under Sol’s price, yet cost $5.01 per task, about four times Sol.
- Same price, a better trade. Haiku 5.5 costs 2.7x GPT-6 Luna per task ($0.41 vs $0.15) because it writes more tokens, and it passes 2.5x as many terminal coding tasks. For code, that is the better deal.
- Effort is a price dial. Gemini 4 Hydrogen goes from $1.87 per task at high to $3.16 at xhigh for 3 more index points. Claude Fable 5.2 in Claude Code costs $7.51 per coding-agent task at high and $44.22 at max, and scores lower at max (56 vs 58).
Then add retries. A failed attempt still bills every token, and someone has to read the bad diff. Illustrative numbers: a model that costs $0.05 per attempt and passes 40% of your tasks costs $0.125 per success, plus the review time for the misses; a model at $0.30 per attempt that passes 90% costs $0.33 per success and wastes far less of your day. Run 20 of your own tasks through two or three candidates and compare cost per passing task, not price per token.
Five ways to cut the bill
- Cache the repo context. Coding agents resend the same files, rules and tool definitions on every step. Cached input costs $0.01 per million on Haiku 5.5 and GPT-6 Luna, $0.003 on DeepSeek V4.1-Flash off-peak, $0.075 on Gemini 4 Hydrogen and $0.10 on GPT-6.2 Sol and Sonnet 5.5: 90–98% off. On Claude, writing a five-minute cache costs 1.25x the input price, so caching pays from the second request.
- Batch or schedule anything that can wait. Anthropic, OpenAI and Google take 50% off batch jobs. OpenAI also bills eligible background requests on GPT-6.2 Sol and GPT-6 Luna 30% below standard for a 2-hour window and 40% below for 8 hours. DeepSeek’s off-peak rates are half of peak (peak is weekdays 01:00–04:00 and 06:00–10:00 UTC), and Moonshot bills Kimi batch jobs at 60% of standard.
- Lower the effort before changing the model. Start at medium and raise it only for tasks that fail. The examples above show max effort often costs several times more for the same or a lower score.
- Watch the context price steps. Haiku 5.5 costs five times more ($0.50 / $2.50) once a single prompt exceeds 100K tokens, and an agent that keeps whole files and test logs in context can get there in a long session. GPT-6.2 Sol rises to $4 / $15 above 272K input tokens. Gemini 4 Hydrogen is flat across its 1M window. Trim or compact context, or send long-context work to a flat-priced model.
- Route easy requests to a cheap model. This usually saves the most; the next section shows how.
How to route requests to cheaper models automatically
Most coding requests are easy: rename this, add a docstring, write a commit message, explain an error. Routing sends those to the cheap model and keeps the expensive one for requests that need it. You don’t need an LLM to pick the LLM; rules in code work and cost nothing per request:
- Cheap model by default (Haiku 5.5 or DeepSeek V4.1-Flash): single-file questions, docstrings, commit messages, test scaffolding, lint fixes.
- Mid tier (GPT-6.2 Sol): the request touches several files, includes a failing test or stack trace, or asks to “refactor”, “migrate” or “design”.
- Escalate on failure (Sonnet 5.5, then Opus 5.5 or Fable 5.2): the first attempt left tests red or the patch didn’t apply.
- Log every hop with model, tokens, cost and pass or fail, then tune the thresholds on real data.
Escalate on failure, not by default
Our guide to auto model routing without an LLM classifier walks through a production router built this way: regex and feature scoring before the call, an upgrade step when retrieved context looks weak, and plain pytest tests for every rule.
The best value under $100 a month
For daily interactive coding, a flat plan is the simpler budget. ChatGPT Plus, for example, includes an estimated 17–180 GPT-6.2 Sol messages in Codex every five hours for $20, while $20 of API usage buys roughly 17–39 Sol tasks of the size modeled below. US prices as of November 20, 2026:
| Plan | Per month | What you get for coding |
|---|---|---|
| GitHub Copilot Free | $0 | 2,000 completions a month; limited chat and agent use |
| Gemini API free tier | $0 | Gemini 4 Hydrogen free of charge; data may be used to improve Google products |
| ChatGPT Go | $8 | Codex with GPT-6 Luna (subject to rollout) |
| Cursor Plus | $8 | Cursor’s own models only (Grok 4.7, 4.6, 4.5 and Composer 2.5); no Claude, GPT or Gemini |
| GitHub Copilot Pro | $10 | Unlimited completions and next-edit suggestions; $15 of AI credits |
| GLM Coding Plan Lite | From $18 | GLM-5.3 and GLM-5.3-Flash inside Claude Code, Codex, OpenCode or Cline |
| Google AI Pro | $19.99 | Expanded Gemini limits in Google Antigravity and AI Studio |
| Claude Pro | $20 ($17 billed yearly) | Claude Code with Sonnet 5.5, Opus 5.5 and Haiku 5.5; Fable via usage credits |
| ChatGPT Plus | $20 | Codex with GPT-6.2 Sol, GPT-6.1 Sol and Luna |
| Cursor Premium | $30 | 4x Plus usage on Cursor’s models; Claude, GPT and Gemini billed at API list price from prepaid credit |
| GitHub Copilot Pro+ | $39 | Unlimited completions; $70 of AI credits |
At exactly $100 you get Claude Max, the $100 ChatGPT Pro tier, Copilot Max ($200 of AI credits) or Cursor Super. Move up only when a $20 plan’s limits stop you several days a week.
For automation (CI review, bulk fixes, bots), pay per token. Here is what $100 buys at list prices, using the coding-agent task from our pricing comparison: 400K input and 40K output tokens across one multi-step task.
| Model | Per task, no caching | Tasks per $100 | Per task, 90% of input cached | Tasks per $100 |
|---|---|---|---|---|
| Haiku 5.5 or GPT-6 Luna (prompts ≤100K) | $0.06 | ~1,667 | $0.028 | ~3,623 |
| Haiku 5.5 (prompts over 100K) | $0.30 | ~333 | $0.14 | ~725 |
| DeepSeek V4.1-Flash (off-peak) | $0.084 | ~1,190 | $0.031 | ~3,218 |
| Gemini 4 Hydrogen | $0.90 | ~111 | $0.39 | ~258 |
| GPT-6.2 Sol or Sonnet 5.5 | $1.20 | ~83 | $0.52 | ~194 |
The table uses the same token counts for every model, which flatters verbose ones, and leaves out cache-write premiums. Our picks:
- $0: Gemini 4 Hydrogen’s free API tier plus Copilot Free.
- $10: Copilot Pro, if you mostly want autocomplete and the occasional chat.
- $30, best value for most developers: Claude Pro (Claude Code with Sonnet 5.5) or ChatGPT Plus (Codex with GPT-6.2 Sol), plus Copilot Pro for unlimited completions.
- On top, for automation: Haiku 5.5 through the Batch API, about $2 per 1,000 code reviews.
FAQ
What is the cheapest LLM for coding in November 2026?
Claude Haiku 5.5 is the cheapest model that still holds up on agentic coding: $0.10 per million input tokens and $0.50 per million output tokens for prompts up to 100K tokens. It scored 33% on Terminal-Bench 4.0 in Artificial Analysis’s run, against 13% for GPT-6 Luna at the same price. DeepSeek V4.1-Flash is the cheapest open-weight option at $0.15/$0.60 off-peak.
Which LLM offers the best price for acceptable coding quality?
GPT-6.2 Sol at $2/$10 per million tokens, with cached input at $0.10. It scores 57 on the Artificial Analysis Intelligence Index, and its predecessor GPT-6.1 Sol cost $1.27 per index task against $10.02 for Claude Sonnet 5.5 at the same list price. Pay for Sonnet 5.5 when multi-file agent work keeps failing on cheaper models.
Is the cheapest model per token also the cheapest per task?
Often not. GLM-5.3 lists at $1.40/$4.40 per million tokens, below GPT-6.1 Sol’s $2/$10, yet cost $5.01 per Artificial Analysis index task against Sol’s $1.27. Tokens per task and retries decide the bill, so measure cost per finished task on your own work.
How do I route requests to cheaper models automatically?
Send every request to a cheap default model and escalate on clear signals: a change that spans several files, a failing test in the prompt, or a failed first attempt. Rules in code, such as token counts, file counts and keywords, add no latency or token cost, unlike an LLM classifier call. Our routing guide shows a tested heuristic router.
What is the best value for AI coding under $100 a month?
For most developers, $30: GitHub Copilot Pro ($10, unlimited completions) plus Claude Pro ($20, includes Claude Code) or ChatGPT Plus ($20, includes Codex with GPT-6.2 Sol). Add pay-as-you-go Haiku 5.5 through the Batch API for automation; at 30K input and 2K output tokens per review, 1,000 code reviews cost about $2.
Is there a free LLM for coding?
Yes. Gemini 4 Hydrogen has a free tier on the Gemini API, though free-tier data may be used to improve Google products. GitHub Copilot Free includes 2,000 code completions a month, and ChatGPT Free includes limited Codex access with GPT-6 Luna, subject to rollout.
Sources
Prices checked on provider pages on November 20, 2026; benchmarks as published September–November 2026. Scores marked as a maker’s own are vendor-run; Artificial Analysis results are independent. Plans and prices change often, so confirm before you buy.
- Anthropic: Claude API pricing (Haiku 5.5, Sonnet 5.5, caching, batch)
- OpenAI: API pricing (GPT-6.2 Sol, GPT-6 Luna, batch, background, long context)
- Google: Gemini API pricing (Gemini 4 Hydrogen, Gemini 3.8 Flash)
- Artificial Analysis: Claude Haiku 5.5 (Terminal-Bench 4.0, tokens per task)
- Artificial Analysis: GPT-6.2 Astra and GPT-6.2 Sol
- AlphaSignal: Artificial Analysis Coding Agent Index v2.1 results and cost per task
- The Decoder: Artificial Analysis Terminal Bench 4 results (Sonnet 5.5, Opus 5.5)
- GrandLinux: AI models compared, November 2026 (AA v5.0.1 scores, cost per task)
- Computingforgeeks: Claude Haiku 5.5 benchmarks and hands-on tests
- Computingforgeeks: Claude Sonnet 5.5 benchmarks and effort tests
- OfficeChai: GPT-6.2 Sol and Astra benchmarks
- VentureBeat: DeepSeek V4.1-Flash pricing and benchmarks
- DeepSeek: V4.1-Flash release and off-peak pricing
- VentureBeat: Google launches Gemini 4 Hydrogen (Terminal-Bench 4.1)
- eesel: Gemini 4 Hydrogen pricing and cost per task by reasoning level
- Apidog: Kimi K3.1 Pro API pricing
- Moonshot: Kimi API pricing (batch at 60% of standard)
- Z.ai: GLM Coding Plan
- Anthropic: Claude plans
- OpenAI: ChatGPT and Codex plan pricing
- GitHub: Copilot plans
- Cursor: plans and pricing
- Google: Google AI plans (US)
