Skip to main content
Routing decides where each call for Sensei goes. With no rules, Sensei answers every call. With rules, you can send some calls to a model on your own provider key, split calls between two models, cap spend, or refuse calls of a certain kind. Whichever model answers, the call starts with what Sensei has learned on the project. See Learnings on routed calls. Routing rules are on every plan. Spend caps on a rule need the Team plan. Only an account admin can change routing, and everyone on the account can read it.

How a call is routed

  1. Rules run top to bottom. The first enabled rule whose conditions all hold decides.
  2. If no rule matches, the call goes to Everything else, the default. Sensei alone is the usual default.
  3. The rule names one model or a split. A session keeps the model it drew on its first call, so a conversation does not change model part way.
  4. If the chosen model cannot answer, for example because a provider key was rejected, the call moves to the rule’s other models, then to the rule’s fallback, then to Sensei. A call fails for a routing reason only when a rule in force refuses it.
Two kinds of call skip the rules. A call that names a provider model directly, such as openai/gpt-5, is served by that model. A call with the header x-senselab-route: direct is answered by Sensei. Every call is recorded with the rule that decided it and the model that answered. A rule’s Evidence tab compares its models on your own results and opens any task step by step, each call on the Sessions page has a routing badge, and every response carries an x-senselab-route header. See Evidence and traces.

Runs follow the same rules

The model calls of a run are routed like any other call. A rule on API key matches the runs started with that key, and a rule on Project matches the runs on that project. So you can keep one rule, with a key of its own, for each way you want runs done, such as one key for runs on GPT and another for a split. See Choose the model.

Learnings on routed calls

Sensei’s Learnings belong to the project, and the model that answers a call does not change which ones it gets. A call that a rule sends to a model on your own provider key starts with the same Learnings as a call Sensei answers. Its turn gets an outcome and a summary in the same way, and the next turn on the project reads that summary, whichever model serves it. The same holds for a call that names a provider model directly. With a split between Sensei and another model, both halves of your team’s work feed one set of Learnings. A correction made in a session Sensei answered reaches the sessions the other model answers, and a fix the other model found reaches Sensei. The Recalled card of a session lists what its calls started with. To send a call without Learnings, add the header x-senselab-learnings: off, as on any call. Two things stay with the calls Sensei answers. The version of Sensei trained on your project serves only those calls, and the content of calls on your own keys is never kept as training material. See Your model and Provider keys. A model on your key is also sent the conversation as your tool sent it, with the Learnings added. Sensei shortens a long conversation only for itself.

What a routed model gains

A model that starts from Learnings does not have to carry its team’s history in every call to know what the team already worked out. In October 2026 we measured this on a team of ten agents working 300 support and CI repair tasks whose rules changed partway through. The same frontier model ran three ways: on its own, with 20,000 tokens of the team’s history in every call, and working from the learning that is built into Sensei. Across ten repetitions of the test, on the tasks whose rule had changed, the model was right on the first try 0% of the time on its own, 94% of the time carrying history and 96% of the time working from what the team had learned. Token use was within 1% of the table’s. So the model reached the result of carrying its full history on about a seventh of the tokens and a tenth of the cost. Compared with the model on its own, it used about twice the tokens and solved 99% of tasks where it had solved 80%. Token counts include the calls made to keep the learning up to date. Read these figures with three things in mind:
  • The test gave the model the team’s learning directly. It did not go through a routing rule, and we have not yet run the same test through one.
  • The tasks were short, so expect the ratios to carry over better than the dollar amounts.
  • Sensei adds Learnings to a routed call and removes nothing from it. The token saving arrives when your agents stop carrying history, rules files or notes of their own to stay consistent, and as fewer retries.
Requests answered by a model on your key are free for the first 1,000 a month, then $1 per 1,000, on top of what the provider bills. See Usage and cost.

Observe before you enforce

The switch at the top of the page has two positions. Start in Observe, read the table for a few days, then switch to Enforce when the would-be decisions look right.

Start from a template

Start from a pattern offers rules to start from. The model names are filled in from your provider keys. Until a provider key is connected, only the two that keep calls on Sensei are offered.
The Start from a pattern dialog, with the rules an account without a provider key can start from
Rules describes every part of a rule.

The tabs

The four figures above the tabs cover the last 7 days: calls the rules saw, the share decided by a rule, rules switched on, and automatic moves.
The Routing page: Observe and Enforce, four figures, the five tabs and the list of rules ending in Everything else

Versions

Every save is a new version of the policy, and so is every automatic move. The Versions tab lists them with who or what made each one. Restoring an old version creates a new one with the old configuration, for example “Created v12 using the configuration from v9”.

Settings

The Settings tab of Routing: project data, notifications, and export, import and API access
Project data declares what each project’s traffic may contain: internal, customer or regulated. A rule with the Project data condition reads this. Nothing is inspected. Notifications chooses where you hear about a split that ramps up, a split that rolls back and a spend cap that is reached: in the app, by email, or at a signed webhook. You can send a sample event to a saved webhook URL. Export, import, API gives you the policy as one JSON document. You can download it, paste one in, or read and write it over the API.
Reading works with any key of the account. Saving with PUT needs a key created by an admin. A policy that is pasted or sent is saved as a new version once it validates against your provider keys, and nothing changes until then.

Limits

A policy can have 50 rules, fewer if your plan says so. A split can name 6 models, and its shares add up to 100.