Free Track
Choosing a Frontier Model
There is no single "best" AI coding model — there is a best model for your task, budget, and workflow, and the answer keeps changing as providers ship new versions. This free guide gives you a durable way to reason about the choice among Claude, OpenAI/GPT, and Gemini (and the others), so you can decide for yourself instead of chasing a leaderboard. It teaches the dimensions that matter and gives you two decision tables you can reuse every time you pick.
Read this first — models and prices change fast. Every specific model name, context-window number, and price in this guide is framed as of writing and will drift. Treat this page as a method for choosing, not a live scoreboard. Always confirm the current model lineup and pricing on each provider's own docs and pricing page (linked at the bottom) before you commit real money or a production dependency to a choice.
The landscape (as of writing)
Most coding teams today are choosing between three families of frontier models, each with a first-party agentic terminal tool:
-
Anthropic — Claude, driving Claude Code
(the tool this course started with). Instruction file:
CLAUDE.md. -
OpenAI — the GPT family, driving the
Codex CLI. Instruction file:
AGENTS.md. -
Google — the Gemini family, driving the
Gemini CLI. Instruction file:
GEMINI.md.
These three are not the whole field. Open-weight and other hosted models — for example Meta's Llama, Mistral, DeepSeek, Qwen, and xAI's Grok — are real options, especially when you need to self-host, run locally, or control cost and data residency. The method in this guide applies to any of them: score the model on the dimensions below against what your task actually needs.
Mindset shift: stop asking "which model is best?" and start asking "best for what?" A model that is overkill (and overpriced) for renaming variables can be the right call for a subtle concurrency bug — and vice-versa. The skill is matching the job to the model class.
The dimensions that matter
Whenever you compare models, walk these seven dimensions. Weight them by what your task actually demands — a CI bot and a hard-bug investigation care about completely different columns.
- Reasoning depth. How well the model plans multi-step work, holds a hard problem in its head, and recovers from a wrong turn. Matters most for architecture, tricky bugs, refactors, and anything ambiguous. Providers usually expose this as a "reasoning effort" or a higher-tier model you opt into when a task is hard.
- Speed / latency. How fast tokens come back. A snappy model keeps an interactive session pleasant and makes tight edit-run-observe loops cheap; a slow, heavy model is worth the wait only when the problem earns it.
- Cost. Usually billed per input/output token (or bundled into a subscription tier). The flagship/reasoning tiers cost meaningfully more than the fast tiers — which is exactly why you don't send every task to the top model.
- Context window. How much text (code, docs, logs) the model can consider at once, measured in tokens. Bigger windows let you drop whole modules or large logs in without hand-picking snippets — but a large window is not free, and stuffing it full still dilutes attention.
- Coding strength. How reliably the model writes correct, idiomatic code, uses tools, and follows a repo's conventions. This is the headline benchmark everyone quotes — and the one that changes fastest, so verify it yourself on your stack rather than trusting a chart.
- Agent / tool ecosystem. The maturity of the surrounding agentic tool: the CLI, headless/CI mode, MCP and tool integrations, subagents, sandboxing and permissions, IDE and cloud surfaces. A slightly weaker model inside a stronger agent harness often wins on real work.
- Multimodal input. Whether the model can take images (screenshots, mockups, diagrams, a failing UI) alongside text. Handy for front-end work, reproducing a visual bug, or turning a design into code.
Think in model classes, not model names
Every major provider ships a tiered lineup rather than one model. Names and version numbers rotate constantly, but the shape is stable, so it's far more durable to reason about the class you need:
- Fast / economy tier — cheapest and quickest, tuned for high-volume, well-scoped work: boilerplate, simple edits, classification, summarizing, CI jobs, first drafts. (As of writing, providers market these as their "flash," "mini," or "fast" models.)
- Balanced / workhorse tier — the sensible default for most day-to-day coding: good reasoning without the top-tier price.
- Flagship / reasoning tier — the strongest, most expensive, often slower option, plus optional "extended thinking / high reasoning effort." Reserve it for hard bugs, architecture, and gnarly refactors.
Because most agentic CLIs let you switch models mid-session (for example a
/model command, or a -m/--model flag),
a good habit is: default to the balanced or fast tier, and escalate to
the flagship tier only when a task proves hard. That single habit
controls most of your spend.
You already have three CLIs to try. Each provider offers a low-friction way to start — so you can benchmark them on your own repo instead of trusting someone else's numbers.
claude
npm install -g @openai/codex
codex
npx @google/gemini-cli
Decision table: task → suggested model class
This maps a kind of task to a model class, not a specific model — so it survives the next release cycle. It's a starting point, not a law: your stack and prompts change the answer.
Verify current models & pricing. Which named model sits in each class — and what it costs — changes frequently. Confirm today's lineup on each provider's docs/pricing before you rely on this.
| Your task | Suggested class | Why |
|---|---|---|
| Boilerplate, simple edits, renames, formatting fixes | Fast / economy | Well-scoped and high-volume — pay for speed and low cost, not deep reasoning. |
| Everyday feature work, small bug fixes, writing tests | Balanced / workhorse | The sensible default: solid reasoning without the flagship price. |
| Subtle bug, concurrency/race condition, ambiguous root cause | Flagship / reasoning (raise reasoning effort) | Hard, multi-step reasoning is exactly what the top tier is for. |
| Architecture decisions, large refactor plan, tricky design | Flagship / reasoning | Planning quality compounds — a better plan saves many downstream edits. |
| Reading a huge codebase, long logs, or many docs at once | Whichever provider offers the largest context window you need | Context capacity, not raw smarts, is the binding constraint here. |
| High-volume automation / CI (thousands of runs) | Fast / economy (in headless mode) | Cost per run dominates at scale; reserve the flagship for escalations. |
| Front-end from a screenshot, mockup, or visual bug | Any tier with strong multimodal (image) input | Feeding the image directly beats describing it in words. |
| Independent second-opinion review of generated code | A different provider/model than wrote it | A fresh model catches blind spots the author model shares. |
Cost & context comparison (as of writing)
This is a shape-of-the-market snapshot, deliberately qualitative. It shows how the three families line up on the dimensions that are relatively stable (agent tool, instruction file, tiering) and points you at where to check the volatile numbers.
Verify current models & pricing. Context-window sizes and per-token prices move every release. The entries below are directional and as of writing — do not quote them as fact; open each provider's pricing page for today's numbers.
| Family | Agentic CLI | Instruction file | Model tiers | Context window (approx., verify) | Cost posture (verify) | Multimodal |
|---|---|---|---|---|---|---|
| Anthropic — Claude | Claude Code | CLAUDE.md |
Fast → balanced → flagship, with extended thinking | Very large (hundreds of thousands of tokens) | Subscription tiers or per-token API; flagship costs more | Yes (images) |
| OpenAI — GPT | Codex CLI | AGENTS.md |
Fast/mini → balanced → flagship, with reasoning effort | Very large (hundreds of thousands of tokens) | ChatGPT plan sign-in or per-token API; flagship costs more | Yes (--image input) |
| Google — Gemini | Gemini CLI | GEMINI.md |
Flash (fast) → Pro (flagship) | Up to ~1M tokens on some models (notably large) | Generous free tier via Google login, plus API/Vertex billing | Yes (images) |
| Others (Llama, Mistral, DeepSeek, Qwen, Grok, …) | Varies / self-hosted | Tool-dependent | Wide range, incl. open-weight you can self-host | Varies widely | Often the cheapest, esp. self-hosted; you own the ops | Varies |
Notice what's stable here: every family has a fast tier and a flagship tier, every one has an agentic CLI and a project instruction file, and all the headline ones take images. That structural similarity is why a portable habit — default low, escalate when hard, verify prices — beats memorizing this quarter's model names.
A repeatable way to pick
- Name the task's real constraint. Is it correctness on a hard problem, throughput at low cost, a giant context, or an image? That names your dominant dimension.
- Pick the class, then the provider. Choose fast / balanced / flagship first; only then pick whose model fills that class best for your stack and budget.
- Default low, escalate on evidence. Start on a balanced/fast model. If it stalls, spins, or produces subtly wrong code, switch up a tier or raise reasoning effort — don't start at the top "just in case."
- Benchmark on your own repo. Run the same real ticket through two or three CLIs. Your codebase and prompts matter more than any public benchmark.
- Consider a multi-model workflow. A cheap model can draft and a stronger (or different-provider) model can review — independent eyes catch more than a single model re-reading its own output.
- Re-check quarterly. The lineup you chose will be superseded. Revisit the pricing and model pages a few times a year.
Pitfalls
- Chasing "the best model." Benchmark rankings flip with every release and rarely reflect your codebase. Pick for the task, then verify on your own work.
- Defaulting to the flagship for everything. The fastest way to burn budget. Reserve the reasoning tier for problems that actually need it.
- Treating any number here as durable. Prices, context windows, and model names all move. Quoting a stale figure in a decision doc will bite you — always link the live pricing page instead.
- Ignoring the agent, judging only the model. The CLI, its headless/CI mode, permissions/sandbox, MCP support, and context tooling often matter more to real throughput than a few benchmark points.
- Locking in without trying alternatives. Switching cost is low — the CLIs and instruction files are near-analogous — so a periodic bake-off is cheap insurance.
Go deeper
This free guide gives you the framework. The Premium tracks turn it into fluency: the provider deep-dives teach each tool hands-on, and the cross-model prompting module shows how to run all three well and build multi-model pipelines.
- Free overviews — start with OpenAI for Coding — Overview and Google Gemini for Coding — Overview.
- Premium deep-dives — OpenAI Codex CLI in Depth, Gemini CLI in Depth, and Prompting Across Frontier Models.
- Unlock everything — see Upgrade for what Premium includes.
Official docs (verify current models & pricing here):
- Claude Code — code.claude.com/docs
- OpenAI Codex — developers.openai.com/codex
- Google Gemini CLI — geminicli.com/docs