# How do you test a model router change before it ships?

> Test a routing change by running real, reviewed requests through the same code path production uses, rules included, and grading each pick against the models a reviewer accepted. A test that skips the rules can pass while the shipped policy breaks one. Auto, the Mac app for all your coding agents, checks its routing changes against reviewed cases that include picks people rated down.

Author: Nadav Hollander (https://www.linkedin.com/in/nadav-hollander-8268585a/)
Published: 2026-11-04T17:20:00.000Z
Reading time: 6 min
Canonical: https://auto.sh/blog/how-to-test-a-routing-change
Part of: What is an LLM router? (https://auto.sh/blog/what-is-an-llm-router.md)
Publisher: Auto (https://auto.sh)

## Key facts

- A routing test that skips the person's rules can pass while a shipped change stops a rule from holding, so the test has to run the same path production runs.
- Anthropic's guide to building evaluations advises designing them to mirror your real-world task distribution, edge cases included, and grading them automatically where possible ([Anthropic](https://platform.claude.com/docs/en/test-and-evaluate/develop-tests), read November 4, 2026).
- Before a routing change ships, the Auto team checks it against reviewed routing cases, including picks people rated down, run through the same rule path production uses.

Test a routing change by running real, reviewed requests through the same code path production uses, with the person's rules loaded, and grading each pick against the models a reviewer accepted. Auto, the [Mac app for all your coding agents](https://autorouter.com/), checks its routing changes this way before they ship, against reviewed cases that include picks people rated down. A rating you send can become a case that later routing changes are checked against. Auto wrote this post, and it describes a manual check by the Auto team: Auto doesn't publish benchmarks of its own routing yet, and automatic evaluations on real coding tasks are coming soon.

## Why can a routing test pass while production fails?

A routing test can pass while production fails when it calls the model-picking step without the layers production runs around it. Routing has several: the person's rules, how hard the turn is, the quality bar, the plans and the price. A test that hands requests straight to the picking step never runs the rules, so a change that stops a rule from holding still passes. Run the same entry point production runs, with saved rules loaded, so every layer takes part. [What is an LLM router?](/blog/what-is-an-llm-router) describes the kinds of routers and their layers.

![A test that skips the rules passes even when a rule stops holding. Calls the picking step directly: Your rules (skipped), then Difficulty, then Quality bar, then Your plans, then Price. A change that breaks a rule still passes. Runs production's entry point: Your rules, then Difficulty, then Quality bar, then Your plans, then Price. A change that breaks a rule fails the test. Source: How Auto checks a routing change before it ships.](https://auto.sh/blog/images/how-to-test-a-routing-change/1-test-path.png)

## What goes into a set of reviewed cases?

Each reviewed case records one real request and the answer a reviewer accepted for it:

- The real prompt, with the settings, rules and plan state it ran under.
- The model or models a reviewer accepted for it.
- One sentence on why the case matters, so a later reader knows what it protects.
- A stable ID, so a failure points at one case.

Two checks keep the set honest. Reject two approved cases whose inputs match but whose accepted answers don't overlap, since no policy can pass both. When a product change retires a setting a case depends on, send the case back for review instead of relabeling it to pass.

Anthropic's guide to building evaluations advises designing them to mirror your real-world task distribution, edge cases included, and grading them automatically where possible ([Anthropic](https://platform.claude.com/docs/en/test-and-evaluate/develop-tests)). Routing cases fit both: the requests come from real use, and a pick either matches an accepted model or it doesn't.

## Where do the most useful test cases come from?

The most useful cases come from picks people rated down, because each one shows where the policy fell short on a real request. Auto lets you rate a pick when it falls short, and the Auto team reviews every rating people send. The reviewed cases Auto checks routing changes against include picks people rated down, so a rating can do more than flag one turn: once reviewed, it can become a case that later changes are checked against.

Real prompts need a basis for keeping them. Auto keeps the message that opens each turn, up to 4,000 characters, to review routing, along with records of the model chosen, tokens and cost, and it doesn't store transcripts ([Auto privacy policy](https://autorouter.com/privacy)).

## How do you grade a routing decision?

Grade each pick against the models a reviewer accepted for that case, and scope any accepted exception to that one case and plan. An exception keyed by a category, such as every hard turn on one plan, can hide a wrong answer in another case of the same category. Report direct matches apart from accepted exceptions, and fail the run on any miss, so a reader sees how much of a pass rests on exceptions.

| Test design                                    | What it can miss                                    |
| ---------------------------------------------- | --------------------------------------------------- |
| Calls the model-picking step without the rules | A change that stops a rule from holding             |
| Accepts exceptions by category                 | A wrong answer in another case of the same category |
| Uses only hand-written prompts                 | How people phrase real requests                     |
| Relabels a case when a setting is retired      | A case that no longer tests anything                |
| Covers only common requests                    | Rare ones, such as a turn no other model can run    |

## What should a test of a rule cover?

A test of a rule should cover every case where obeying the rule costs something: the excluded model is the cheapest one that clears the bar, no other model clears it, or no other model can run the turn at all. Auto's avoid rules show why each branch needs its own case.

An avoid rule is always respected: Auto never sends the turn to the avoided model, even to continue an earlier turn that ran on it. It picks the next model that clears the quality bar, even when that model costs more. If no other model clears the bar, the strongest remaining model runs the turn, and if no other model can run the turn at all, Auto refuses it and names the rule. A team that writes a rule to keep a model out can count on that rule holding.

![Each branch of an avoid rule needs its own test case. A rule says to avoid one model. If the avoided model is the cheapest that clears the bar: A pricier model that clears the bar runs the turn; If no other model clears the bar: the strongest remaining model runs the turn; If no other model can run the turn: Auto refuses the turn and names the rule. In every case the avoided model never runs the turn, even to continue an earlier turn that ran on it. Source: Auto's avoid rules, as of November 2026.](https://auto.sh/blog/images/how-to-test-a-routing-change/2-avoid-rule.png)

## What does a passing test not show?

A passing test shows that the policy gave an accepted answer on every case in the set, and nothing more. It doesn't show how often picks are right on live traffic, what turns cost, or whether the set covers what people send next. Use a green run to decide a change is ready for review, and watch live picks and ratings after it ships.

## Questions

### Does a passing test prove a change is better?

No. It proves the change gives accepted answers on the cases in the set. Whether picks improve on live traffic takes a separate measurement, such as how ratings move after the change ships.

### How many cases does a set need?

Enough that each rule and each common kind of request has at least one case that fails when it breaks. Anthropic's guide favors more cases with automated grading over fewer hand-graded ones ([Anthropic](https://platform.claude.com/docs/en/test-and-evaluate/develop-tests)), and routing picks can be graded automatically against accepted models.

### Should a rule change ship with a test case?

Yes. Add a case that fails without the change, so a later edit that undoes it shows up in the next run.

### Does Auto publish its routing test results?

Not for its own routing yet. The Auto team reviews real routing decisions and every rating people send, ratings and tests of each new model retune the router, and automatic evaluations on real coding tasks are coming soon. For an engineering team, Auto builds a [free benchmark built from the team's own shipped work](/) and tunes routing, skills and prompts against it; [how do you build an AI coding benchmark for your company?](/blog/build-an-ai-coding-benchmark) shows how to build one yourself. [How AutoRouter picks a model for each turn](/blog/how-autorouter-picks-a-model) explains the order it follows.

## Sources

- [Anthropic: Define success criteria and build evaluations](https://platform.claude.com/docs/en/test-and-evaluate/develop-tests), read November 4, 2026
- [Auto privacy policy](https://autorouter.com/privacy)

## Read next

- [An open scorecard for benchmarking coding agents on your own codebase](https://auto.sh/blog/coding-agent-benchmark-scorecard.md): Auto's open scorecard is a free template for benchmarking coding agents and models on your own codebase: a YAML task spec with a JSON Schema, a CSV run log, a CSV summary and a validation checklist. Fill it from your merged pull requests, run every task at least three times per setup, and compare pass rate with a 95% Wilson interval, cost per solved task, median time and flakiness. Auto, the Mac app for all your coding agents, also builds a free company benchmark for teams that want help.
- [How Ramp, Cursor and Uber build AI coding benchmarks, and how you can](https://auto.sh/blog/private-benchmarks-ramp-cursor-uber.md): Auto, the Mac app for all your coding agents, builds a free private coding benchmark from your team's merged pull requests, the approach Ramp, Cursor and Uber each took in-house. Ramp grades 500 tasks from merged agent pull requests with a panel of LLM judges, Cursor grades real sessions with agentic graders and refreshes them every few months, and Uber runs thousands of monorepo pull requests through one harness to pick the Pareto-best model. A startup can copy the method with one workflow, a few dozen validated tasks, three runs per model, and pass rate and cost per task.
- [How do you build an AI coding benchmark for your company?](https://auto.sh/blog/build-an-ai-coding-benchmark.md): Build an AI coding benchmark for your company from recent merged pull requests: start each task from the code before the change, hold back its tests, and grade every model and agent on pass rate and cost per task. Auto, the Mac app for all your coding agents, builds one from a team's own shipped work for free.

Tags: [Model routing](https://auto.sh/blog/tags/model-routing.md), [Auto](https://auto.sh/blog/tags/autorouter.md)

Drafted with AI from the sources linked above, then checked and edited by the Auto team.

Auto is a Mac app for AI model routing in Codex, Claude Code, Cursor and other supported coding agents. It uses eligible connected subscriptions first. See [setup](https://auto.sh/setup.md) and [pricing](https://auto.sh/pricing).
