AI models
A model is the engine; the agent around it is the harness. The same weights can be cheap or expensive, fast or slow, private or not, depending on who serves them and what you send. This page is about the models themselves: what the numbers mean, what the tiers cost, and how to pick one. Wiring a model into a coding agent is a separate job: OpenCode covers ids, pinning and per-agent routing on Models in OpenCode.
Three numbers that decide
- Quality. How well the model plans, follows tools, keeps context and survives a long refactor. It is not one number: a model can be strong at code and weak at prose, or good at short answers and bad at multi-file edits. Benchmarks help, your own tasks decide.
- Price per 1M tokens. Input and output are priced separately, and output usually costs several times more. Cached input is cheaper again. Long prompts above a threshold cost more per token, so the same model can double in price inside one session.
- Context window. How much text the model can hold at once: a file, a folder, a whole small repo. Bigger is not always better — attention degrades and the bill grows — but a window below 100K tokens is tight for agent work.
Price tiers
Orientation prices per 1M tokens, input and output, as seen on OpenCode Console, which is a convenient public price list. Other providers are in the same range:
| Tier | Examples | Price / 1M in+out | Use it for |
|---|---|---|---|
| Free | rotating Console free models | $0 | Public code, drafts, questions, learning a codebase |
| Cheap | GPT 5 Nano, Haiku 5.5, GPT 6 Luna | $0.05–0.10 / $0.40–0.50 | Routine edits, CI jobs, long sessions |
| Mid | DeepSeek V4.1 Flash, Kimi K2.5, Muse Spark 1.3, Sonnet 5.5, GPT 6 Sol | $0.30–2.00 / $1.20–10.00 | Quality per dollar, harder features |
| Top | Claude Opus 5.5, GPT 5.5 | $4.00–5.00 / $20.00–30.00 | Architecture, hard bugs, security review, final pass |
Verify current prices before budgeting: rates move, and every quoted number here is orientation only. The rule that saves the most money is not picking a cheap model — it is matching the tier to the step. Most steps are drafts and routine edits; only the last one decides quality.
Free, paid or local
There are three ways to get a model, and they differ in who pays and who can read your prompts:
- Free tier. A provider absorbs the cost to collect feedback or training data. Ids rotate without notice, rate limits are tight, and the terms decide what happens to your prompts. Good for public code and drafts; never for secrets, customer data or private code. The current pick and the check before pinning it are on Free OpenCode model.
- Paid. You pay per token, the model stays available, and paid tiers usually offer limited retention instead of training on your data. One key for many providers and a single bill is OpenRouter, with 300+ models behind an OpenAI-compatible API.
- Local. The weights run on your hardware, so there is no per-token cost and nothing leaves the machine. Quality is one or two tiers behind the paid frontier and speed depends on your GPU. Ollama is the easy way in; Qwen covers open weights, serving and fine-tuning.
How to choose
- Public code, questions, drafts: the free model. Escalate only when the answer is weak.
- Routine paid work, CI, overnight runs: the cheap tier. GPT 6 Luna is the reference point at about ten cents per 1M input tokens.
- Architecture, hard bugs, security review, final verdict: the top tier. Claude Opus 5.5 is the reference point at four dollars per 1M input tokens.
- Secrets, customer data, private code: a local model, or a paid model whose terms say zero retention. Not a free contributor tier.
- Many providers, one key: OpenRouter. No cloud at all: Ollama with a local model.
Models covered here
- GPT 6 Luna — the cheapest smart paid model: ten cents per 1M input tokens, good enough to run as a full agent, with a price jump above 272K tokens.
- Claude Opus 5.5 — the top of the Claude line: the model to trust with large refactors, tricky debugging and the final review pass.
- Muse Spark 1.3 — a mid-tier paid model, and the story of its retired free contributor variant, which is what a rotating free id looks like when it disappears.
- DeepSeek — the V4 and V4.1 models, Flash and Pro, and their OpenRouter ids in OpenCode.
From model to agent
Choosing the model is half the job. The other half is the harness: which model answers, which one edits, which one reviews, and what each of them is allowed to touch. Models in OpenCode covers ids and variants, pinning a default, per-agent routing, switching mid-session and cost control. The tool-agnostic side is on Creating and developing agents, and the procedures they load are skills.