User guide: contents

5. Models, agents and routing

To open the models settings, switch to the Admin view, choose Administration in the sidebar, then Models under Operations.

The Models page: coding agents, providers and routing rules

The picture comes from test data. On your machine the Coding agents panel shows your own Claude Code and Codex.

Agents#

Agent steps run on one of two command-line agents:

  • Claude Code — uses your Claude login (or an API key).
  • Codex — OpenAI's Codex CLI with your ChatGPT login. Install it with npm i -g @openai/codex (or use the one inside the ChatGPT desktop app) and run codex login.

The Coding agents panel shows whether each is installed and logged in.

Model specs#

Wherever you can pick a model — a step, a flow's defaults, a routing rule, an eval — you write a model spec:

SpecRuns on
sonnet, opus, haikuClaude Code, Anthropic
codexCodex, its default OpenAI model
codex:gpt-5Codex with a specific model
ollama:qwen3-coder:30bClaude Code on a local Ollama model
codex:ollama:gpt-oss:20bCodex on a local Ollama model
lmstudio:<model>Claude Code on LM Studio

You can also set Agent and Provider separately on a step.

Providers and local models#

Anthropic, OpenAI, Ollama (localhost:11434) and LM Studio (localhost:1234) are built in. Add your own (another Ollama host, or any Anthropic-compatible API) under Add a provider. Local models cost nothing and keep your code on your machine; runs record them at $0. Choose models trained for coding and tool use (e.g. qwen3-coder, gpt-oss) — general chat models often fail to call tools. Use Try a model to check one works before you rely on it.

One provider. Each provider in the list is a link; it opens at #/models/<name> (Administration › Models › name). The page shows the status, the models and the agents that use it, its settings (kind, base URL, API key env var, default model) with Save provider, a Try a model box that starts on this provider, and Use in routing: the default model, rules and fallbacks that use it, with a link back to the Models page, where routing is still changed. Remove provider is in the Danger group, only for providers in your config, and asks first. A built-in provider keeps its kind; saving adds an override with the same name. A name that is not a provider shows "This provider is not set up." with a link back. Saves send the same config as before.

Routing#

Rules decide which model runs which step. The first matching rule wins — even over models written in flows and blocks. A rule matches on a step id pattern, a flow name pattern and/or a visit number (From visit 2 = only retries). The Agent column narrows a rule to the steps of one tool: Claude Code steps or Codex steps match only the steps whose own target (before the router) runs on that tool; any agent (the default) matches every step. The rule's model then picks the model, and a Codex model moves the step to Codex. The presets add common rules:

  • Retries on Opus — fix steps use Opus from their second attempt.
  • Codex reviews Claude's code — review steps run on Codex.
  • Small jobs on <local model> — triage and learning steps run locally. It is offered only when a local model is set up.

Without a matching rule, a step uses its own model, then the flow's default, then the Default model.

Fallback models are tried in order when a model hits a rate or usage limit. With Continue on the first free one (local / ChatGPT) when a budget runs out, instead of pausing ticked, runs switch to the first free fallback (local or ChatGPT) instead of pausing when the daily or run budget is used up.


Improve this page on GitHub