Launch offer: the first 1,000 users get Settl free for a year* Claim your spot
settlbuilding in public

The model routing kit (same task test, cost per finished job, a routing table for AGENTS.md)

The short version

A cheaper AI model is only cheaper if it finishes the job. A model that gets it right for two dollars beats one that costs one dollar a try and needs five tries. That is five dollars, plus the hour you spent reading five wrong answers. The price per million tokens is the price of an attempt, not the price of the result.

So the fix is to stop picking models from the pricing page. Give two models the same task, write down what each one actually cost to get a correct answer (money, time and retries), keep that comparison, and put the result in your AGENTS.md or CLAUDE.md so your coding agent sends each kind of task to the model that earned it.

Copy these prompts

Paste them into Claude Code, Codex or Cursor inside your project, in this order.

1. Run the same task on two models

I want to compare two models on one real task from this project: <describe the task>.
Write the task as a single self contained brief with a clear definition of done and one check that proves it is done (a test, a command, or a visible result).
I will run this exact brief once with <model A> and once with <model B>, each from a clean checkout. Do not change the brief between runs.

2. Score what each run actually cost

For each run, give me one row: model, did it pass the check (yes or no), number of attempts until it passed, total time, tokens in, tokens out, and total cost.
Cost per finished job = total cost of every attempt, including the failed ones.
End with a one line verdict: which model is cheaper for THIS kind of task once retries are counted.

3. Write the routing rule into my agent file

Add a "Model routing" section to my AGENTS.md (or CLAUDE.md if that is the file this project uses).
For each kind of task we have compared, write one line: task type, the model to use, and the evidence (cost per finished job and retries).
Tell the agent to use that model for that task type, and to fall back to the stronger model after two failed attempts instead of retrying the cheap one again.
Do not add rows for task types we have not measured.

Why the cheap model gets expensive

Token pricing charges for what the model reads and what it writes. A retry pays for both again. Worse, a retry usually reads MORE than the first try: the original context, the failed attempt, and your correction. So attempt five costs more than attempt one, and a model that needs five attempts is rarely five times the base price. It is often more.

Three places the retries hide:

  1. Silent wrong answers. The model says it is done. It is not. You only find out later, and the fix is another full attempt.
  2. Long agent loops. On a coding agent, one "attempt" can be dozens of tool calls. A weaker model wanders further before it lands.
  3. Your time. Every failed attempt is something you read and judged. That never shows up on the bill.

The comparison log

Keep one line per comparison, in a plain file next to your agent file:

date | task type | model | passed? | attempts | time | tokens in | tokens out | cost per finished job

Two or three rows per task type is enough. You are not benchmarking models in general. You are finding out which one is cheaper for the work YOU actually do.

The routing table

What ends up in AGENTS.md is short. Something like:

## Model routing
- Renaming, formatting, small single file edits: cheaper model. Passed first try in 3 of 3 runs.
- Multi file refactors and bug hunts: stronger model. Cheaper model needed 4 to 5 attempts, cost more per finished job.
- If the chosen model fails twice on a task, stop and switch to the stronger model. Do not retry a third time.

Your coding agent reads this file at the start of every session, so the rule applies itself.

Steal this for your app

Run this on your codebase

Paste this into a session in your repo:

Audit how this project picks AI models. Report before changing anything:
1. Which models are named in AGENTS.md, CLAUDE.md or any agent config, and for what.
2. The three kinds of task I ask for most often, based on recent history in this repo.
3. For each of those, which model I should compare, and the one check that would prove the task is done.
4. Any rule that tells the agent to keep retrying without switching models.
5. A draft "Model routing" section, with every row marked UNMEASURED until I run the comparison.

Get the next one in your inbox