How to choose an AI model for software development
There's no single best model for coding. There's the right one for each task, budget and level of privacy. Here's how to decide, using the vendors' own guidance.
Choosing an AI model for coding comes down to four things: how hard the task is, what it costs, where your code can go and what hardware you have. The good news is you don't have to choose once: the best setup uses different models for different jobs.
Step 1: Match the model to the task
Both Anthropic and OpenAI publish guidance on picking a model. Summarised below (the Local column is our own suggestion):
| Task | Anthropic (Claude) | OpenAI (GPT, in Codex) | Local (our pick) |
|---|---|---|---|
| Hardest, long-running work | Fable 5.2 | GPT-6.2 Astra (GPT-6.1 Sol for repeated long-running work) | Not recommended |
| Complex coding and large refactors | Opus 5.5 | GPT-6.2 Astra | The largest model your computer can run |
| Everyday coding | Sonnet 5.5 | GPT-6.2 Sol | Qwen3.8-27B, Devstral Small 2, Gemma 4 31B |
| Small edits, high volume | Haiku 5.5 | GPT-6 Luna | Smaller Gemma 4 or gpt-oss-20b |
Anthropic suggests starting with Opus 5.5 if you're unsure, and notes that tuning the model's effort level is often a better lever than switching models. OpenAI's model selection guide suggests starting with GPT-6.2 Sol at medium reasoning, and keeping the lightest setting that still meets your quality bar.
Step 2: Consider the cost
On the APIs, prices per million tokens vary widely (input / output): Claude Haiku 5.5 from $0.10 / $0.50, Sonnet 5.5 $2 / $10, Opus 5.5 $4 / $20 and Fable 5.2 $8 / $40; OpenAI's GPT-6 Luna $0.10 / $0.50, GPT-6.2 Sol $2 / $10 and GPT-6.2 Astra $8 / $40 (standard rates for prompts up to 272K tokens). On subscriptions such as Claude Pro or ChatGPT Plus, bigger models simply use up your usage limits faster. Local models cost nothing per request. See understanding token limits.
Prices as listed by Anthropic and OpenAI in November 2026.
Step 3: Decide where your code can go
Anything you send to a cloud model, including your prompts and the relevant code, is received and handled by another company: Anthropic, OpenAI or whoever runs the model. A model running on your own computer keeps your code on your machine; only the model download needs the internet. That makes local models the safer choice for client work or sensitive code. (Ollama also offers optional cloud models, which run on Ollama's servers, not your computer.) Read the most private AI coding tools.
Step 4: Check your hardware (for local models)
A local model has to fit in your computer's memory. Mistral says Devstral Small 2 (24B) runs on a Mac with 32 GB of memory, and OpenAI says gpt-oss-20b runs in about 16 GB. See what computer you need and the best open-source coding models.
How to read coding benchmarks
- SWE-bench Verified tests fixing real GitHub issues in Python projects. OpenAI stopped reporting it in February 2026, citing contamination and flawed tests.
- SWE-bench Pro uses longer, multi-file tasks, but OpenAI estimates about 30% of them are broken.
- LiveCodeBench uses dated contest problems, so models can be tested on problems published after their training.
- Terminal-Bench scores an agent and model together on terminal tasks.
- Arena WebDev ranks models by people's votes on web apps they build.
Most published scores come from the model makers, and results change with the tools used to run them. Treat benchmarks as a shortlist, not a verdict.
Step 5: Test on your own work
Anthropic calls building your own tests the most important step, and OpenAI recommends running the same inputs across models. Pick a few real tasks from your project, try two or three models, and keep the cheapest one that does the job well.
Choosing models in Nexus
Nexus, a native Mac app for building with AI, lets you switch between Claude Code by Anthropic (choosing Opus, Sonnet or Haiku and the effort level), the Codex app by OpenAI and local open models in the same chat, so you can match the model to each task. Every finished task gets a diff and a restore point, which makes comparing models easy. Nexus will be a one-time purchase of $199 USD, with no Nexus subscription. Claude Code and Codex use your own plans, and Nexus needs an Apple silicon Mac with macOS 12 or later (14 or later for local models and the Codex app, 13 or later for Claude Code). Nexus is coming soon.
Frequently asked questions
What is the best AI model for coding?
It depends on the task. Anthropic recommends Claude Opus 5.5 as a starting point for most work and Sonnet 5.5 for everyday coding; OpenAI suggests starting with GPT-6.2 Sol and moving to GPT-6.2 Astra for complex work. For private or offline work, an open model such as Qwen3.8-27B or Devstral Small 2 can run on your own computer.
Should I trust coding benchmarks?
Use them as a rough guide only. Most scores are reported by the model makers, results depend on the tools used to run them, and some benchmarks have known problems: OpenAI stopped reporting SWE-bench Verified in 2026, citing contamination and flawed tests.