# How to write model routing rules in plain English

Authors: AutoRouter
Published: 2026-10-23T02:20:02.312Z
Reading time: 7 min
Canonical: https://autorouter.com/blog/plain-english-routing-rules
Publisher: AutoRouter, the Mac app for Codex and Claude Code (https://autorouter.com)

> AutoRouter, the Mac app for Codex and Claude Code, lets you write routing rules in plain English, such as "Use Claude Opus 5.5 for UI work." When one of your rules applies, it decides the turn, and your rules come before AutoRouter's recommended ones. Choosing a specific model in the picker sends turns straight to that model instead.

[AutoRouter, the Mac app for Codex and Claude Code](https://autorouter.com), lets you write routing rules in plain English, such as "Use Claude Opus 5.5 for UI work." When one of your rules applies, it decides the turn, and your rules come before AutoRouter's recommended ones. You can see how often each rule is used, and choosing a specific model in the picker sends turns straight to that model instead.

AutoRouter wrote this post, and it describes rules as of October 22, 2026.

## How do routing rules work in AutoRouter?

A routing rule is one plain-English sentence that names a kind of work and the model, or kind of model, that should handle it. Rules go first: if one of your rules applies to a turn, that rule decides the turn. AutoRouter's landing page gives this pair as an example: send UI prompts to frontier models, and git commands to a low-cost model.

When none of your rules applies, AutoRouter routes the turn itself. It works out how hard the turn is, considers only the models that clear the quality bar for it, sends hard work to the most capable model your plans cover, and sends everything else to the model that costs you least. [How AutoRouter picks a model for each turn](/blog/how-autorouter-picks-a-model) walks through that order step by step.

One detail matters when you write a rule. Every model has to clear a quality bar for the task before price counts at all, unless one of your own rules names it, so name a model you have seen do that kind of work well.

## Which rules does AutoRouter already follow?

AutoRouter has six built-in rules, so you don't need to write any of these yourself:

- Hard work goes to your strongest model.
- Quick tasks go to the cheapest capable model.
- Unclear work is never treated as a quick task.
- A task that continues keeps its model, or moves up.
- Your plans come first for hard work.
- Untested models are never picked on their own.

A rule that repeats one of these adds nothing. Write your own rules where you want a specific model, or a specific kind of model, for a specific kind of work.

## Which routing rules can you copy?

The first three rules in this table come from AutoRouter's landing page. The rest are examples you could write in the same plain-English style, and AutoRouter doesn't ship them as presets. Each one works the same way: when the rule applies, it decides the turn.

| Situation                                      | Rule you could write                                                               | What it does                                                                             |
| ---------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| UI and front-end work                          | "Use Claude Opus 5.5 for UI work." (landing example)                               | UI turns it applies to go to Claude Opus 5.5.                                            |
| Code reviews                                   | "Prefer GPT-6.1 Sol for code reviews." (landing example)                           | Code review turns it applies to go to GPT-6.1 Sol.                                       |
| Git commands                                   | "Send git commands to a low-cost model." (from the landing's description of rules) | Git command turns it applies to go to a low-cost model.                                  |
| A test that fails only on CI                   | "Use GPT-6 Astra for debugging CI failures."                                       | CI debugging turns it applies to go to GPT-6 Astra.                                      |
| Database migrations                            | "Use Claude Opus 5.5 for database migrations."                                     | Migration turns it applies to go to Claude Opus 5.5.                                     |
| Docs and READMEs                               | "Use Claude Sonnet 5.5 for documentation."                                         | Documentation turns it applies to go to Claude Sonnet 5.5.                               |
| Trying a pay-per-use model on one kind of work | "Use Gemini 4 Argon for writing tests."                                            | Test-writing turns it applies to go to Gemini 4 Argon, at the provider's price plus 10%. |

A few habits make rules easier to manage:

- Describe one kind of work per rule, in the words you would use with a teammate, so each rule's usage count tells you something.
- The lineup changes, so review rules that name a model when the picker changes.
- Leave quick work to the built-in rules unless you want a specific model for it. [How to send quick coding tasks to a cheaper model](/blog/quick-tasks-on-cheaper-models) covers which tasks count as quick.

## How do you add a rule and check that it works?

1. Choose AutoRouter as the model. In Codex, pick it from the model menu under the message box. In Claude Code, run `/model` and choose AutoRouter.
2. Write the rule in AutoRouter as one plain-English sentence, such as "Prefer GPT-6.1 Sol for code reviews."
3. Work as you normally do. Every turn shows its model, what it cost and why.
4. Check how often each rule is used. If a rule shows no uses after a week of the work it describes, reword it in plainer terms or delete it.
5. When a turn goes to a model you didn't want, rate the pick, rewrite the rule, or choose a model yourself in the picker.

## How is a rule different from Claude Code's /model or a Codex profile?

Claude Code's `/model` and Codex profiles set which model runs, and it stays until you change it. An AutoRouter rule chooses a model for each turn it applies to, so the model can change from turn to turn within one session as different rules apply.

In Claude Code, as of October 22, 2026, `/model` switches the model during a session, `claude --model` sets it at launch, `ANTHROPIC_MODEL` sets it for the session you start with it, and the `model` field in a settings file sets a default, in that order of priority ([Claude Code: Model configuration](https://code.claude.com/docs/en/model-config)). The `opusplan` alias uses Opus in plan mode and Sonnet for execution, and a custom subagent can set its own `model`.

In Codex, `/model` chooses the active model and, when available, its reasoning effort ([Slash commands in Codex CLI](https://learn.chatgpt.com/docs/cli/slash-commands/)). A profile is a separate file of settings, such as `~/.codex/deep-review.config.toml`, that you load with `codex --profile deep-review`. Codex 0.134.0 and later ignore the older `[profiles.name]` tables in `config.toml` ([Codex: Advanced configuration](https://learn.chatgpt.com/docs/config-file/config-advanced)).

```toml
# ~/.codex/deep-review.config.toml
model = "gpt-6.1-sol"
model_reasoning_effort = "medium"
```

| Method                 | What you choose                               | Where it applies                                         |
| ---------------------- | --------------------------------------------- | -------------------------------------------------------- |
| Claude Code `/model`   | One model                                     | The current session, and new sessions if you press Enter |
| Claude Code `opusplan` | Opus for planning, Sonnet for execution       | Each phase of a session                                  |
| Codex `/model`         | One model and its reasoning effort            | Turns until you change it                                |
| Codex profile          | A file of settings, including the model       | Each launch with `--profile`                             |
| AutoRouter rule        | A model, or kind of model, for a kind of work | Each turn the rule applies to                            |

Claude Code's and Codex's own settings are the simpler choice when one model suits the whole session, and they need nothing else installed. A rule is worth writing when your sessions mix kinds of work and you already know which model you want for each kind.

## Questions

### Do my rules come before AutoRouter's own routing?

Yes. Your rules come before AutoRouter's recommended ones, and when one of your rules applies, it decides the turn. When none applies, AutoRouter works out how hard the turn is and routes it on its own.

### What happens to my rules when I pick a model in the picker?

Choosing a specific model in the picker sends turns straight to that model, and AutoRouter routes only while it is the model selected. In Claude Code, pressing `s` in the `/model` picker switches the model for the current session only and leaves your saved default, such as AutoRouter, unchanged for new sessions ([Claude Code: Model configuration](https://code.claude.com/docs/en/model-config)).

### Can a rule send work to a model that does it badly?

Yes. The quality bar that every model must clear before price counts does not apply to a model your own rule names. Check the model on each turn after you add a rule, rate any pick that falls short, and rewrite the rule if it keeps happening. [Does model routing make your results worse?](/blog/does-model-routing-hurt-quality) covers where cheaper models fall short.

### What does a rule that names a pay-per-use model cost?

Each turn the rule sends there costs the provider's price plus 10%. Pay-per-use models such as Gemini 4 Argon and Kimi K3 come with Pro, which is $20 a month with $20 of included usage each month, and those turns are billed from the included usage first and then from credits you top up. Each turn shows what it cost.

## Sources

- [AutoRouter](https://autorouter.com)
- [Claude Code: Model configuration](https://code.claude.com/docs/en/model-config), read October 22, 2026
- [Codex: Slash commands in Codex CLI](https://learn.chatgpt.com/docs/cli/slash-commands/), read October 22, 2026
- [Codex: Advanced configuration](https://learn.chatgpt.com/docs/config-file/config-advanced), read October 22, 2026

## Read next

- [What is an LLM router?](https://autorouter.com/blog/what-is-an-llm-router.md): An LLM router is software that sits between an application and several large language models and decides which model handles each request, usually to lower cost or keep requests flowing without giving up quality. Routers range from gateways that pick a provider by price and uptime to rule sets, learned classifiers, cascades and plan-aware routers. AutoRouter, the Mac app for Codex and Claude Code, is a plan-aware router and is unrelated to LiteLLM's Auto Router or OpenRouter's Auto Router.
- [Which model to use for which coding task](https://autorouter.com/blog/which-model-for-which-task.md): Use a frontier model such as Claude Opus 5.5 or GPT-6 Astra for multi-file refactors, hard bugs and UI built from a design. Use a strong model such as Claude Sonnet 5.5 or GPT-6.1 Sol for tests and code review, and a fast model such as Claude Haiku 5.5 or GPT-6 Luna for renames, commit messages and one-line shell commands. AutoRouter, the Mac app for Codex and Claude Code, makes that choice on every turn.
- [How to send quick coding tasks to a cheaper model](https://autorouter.com/blog/quick-tasks-on-cheaper-models.md): Commit messages, renames and one-line shell commands don't need a frontier model. At list prices on October 22, 2026, Claude Haiku 5.5 costs a fortieth of Claude Opus 5.5 per uncached token on prompts up to 100,000 tokens, and GPT-6 Luna costs a hundredth of GPT-6 Astra. You can run those turns on a small model yourself in Claude Code or Codex, or let AutoRouter, the Mac app for Codex and Claude Code, send each quick task to the cheapest capable model, which is often your ChatGPT or Claude plan or a low-cost open model.

Tags: [AutoRouter](https://autorouter.com/blog/tags/autorouter.md), [Model routing](https://autorouter.com/blog/tags/model-routing.md), [Guides](https://autorouter.com/blog/tags/guides.md)

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