Skip to main content
A router is a list of models your coding agent can use. Each request goes to the agent’s router, and the router picks one of its models.

You Already Have One

You don’t need to create a router. The first launch of a coding agent sets one up and asks which models to use: A router named (Managed), such as Dari Codex (Managed), was set up without a subscription and runs on API keys or Dari credits.

Change Models

Open Routers in the Dari Dashboard, choose the router, and pick models on its Models & Keys tab. From the CLI:
dari router models lists every model you can add. Relaunch your agent to see the new list. OpenClaw, Hermes, and the desktop apps need their setup run again.

How It Picks

The router first drops models that can’t handle the request, such as a model without image input for a request with an image. Then:
  • Dari Routing picks the best remaining model for each turn, using each model’s evals. It needs the Autorouting plan.
  • A specific model you chose with /model serves every turn.
By default, Dari Routing picks every turn. Setup also offers once per session, which picks when a session starts and keeps that model. See Session Pinning.

Use Another Router

To move an agent onto a different router, add the agent on that router’s card on the Routers page, or run:
Agent names are claude, codex, muse, opencode, pi, openclaw, and hermes. Assign the agent to the default router to undo it. To make a new router, choose Create Router on the Routers page, or use Router YAML.

Router Templates

Anyone can publish a router as a template, and anyone can launch it with any coding agent. List templates with dari router experiments, then launch one:
The launch adds a copy of the router to your org and shows the template’s models on one page, each with the ways it can be paid for; the models themselves are the template’s. Each starts on your subscription, then your own key, then Dari credits, and you can pick another, or connect a subscription or add an API key right there; some templates leave out your keys or Dari credits. Later launches keep your choices, and open the same page again if a model can no longer be paid for. Then it asks whether to make the template your default for the agent you launched. Without --router, dari claude keeps your current setup. dari setup claude --router <name> does the same setup without launching. On a local or self-hosted gateway, the same command copies the template onto the gateway, where your own subscriptions and keys pay for it. Scripts and agents can answer those questions with flags instead:
--pay <model>=<subscription|key|credits> chooses how a model is paid for; models it leaves out keep their current choice. --default makes the template your default for that agent. With either flag, or without a terminal, the launch asks nothing. Add what’s missing first with dari accounts subscription connect <plan> or dari accounts provider add <provider> <label> <api_key>.

Publish Your Own

The template name comes from the router’s name, so DeepSeek Subagent becomes deepseek-subagent. Pass --template to pick another, and --byok=false or --managed=false to keep users off their own keys or Dari credits. Each launch copies the router as it is then, so changes you make reach users the next time they launch. Your keys are never shared. A template belongs to the org that published it. dari router unpublish <name> removes it; routers set up from it keep working. On the Routers page, Publish on a router’s card publishes it, and the Router Templates tab lists everyone else’s.