Auto Router v2.0
Auto now keeps a conversation on its model while the provider's prompt cache is warm, and switches only when the switch pays for itself.
The Nexus team
Set model to nexus/auto, and Auto picks a model for each request. Auto Router v2.0 is live. It keeps an agent's
conversation on one model while that model's prompt cache is warm. It switches only when the switch saves more than
it costs.
curl -i https://api.nexus.inc/v1/chat/completions \
-H "Authorization: Bearer $NEXUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "nexus/auto", "messages": [{"role": "system", "content": "You are a coding agent."}, {"role": "user", "content": "Fix the failing test"}]}'The x-nexus-model header names the model that ran. The x-nexus-router header names the Auto version that picked
it.
What's new
- A conversation keeps its model. Auto remembers the model each conversation last ran on, for 5 minutes. A conversation is your organization, your API key, your tools, the system message and the first user message. Auto stores a hash of them, not the text.
- A switch must pay for itself. A provider caches the start of a prompt it has already read, and bills a cached read at a fraction of the input price. Another model starts cold and reads the whole prompt at the full price. Auto now counts that cost before it switches. It counts a cached read only when the new prompt starts with the last one, and only on a provider that caches API calls without a request to do so.
- Harder requests still move up. When a request needs a stronger model, Auto moves it up. A tool result in an agent's loop is the usual case.
Why
An agent sends many calls in one conversation, often seconds apart, and its prompt grows with each call. In one week of our own traffic, Auto switched models within the same conversation 11 times in 37 follow-on calls. Each switch read the whole prompt again with no cache.
An illustration, not a measurement: take a 150,000-token prompt. On a model that bills $3 per million input tokens, a warm read costs about $0.045. A switch to a model that bills $0.50 costs about $0.075 for its first, cold read. The cheaper model costs more until its own cache is warm.
How Auto picks a model in v2.0
- It starts from the models you allow. Auto considers only the models your organization's policy allows and can pay for.
- It sorts the request. Auto puts the request in one of three classes: light, standard or heavy.
- It prices each model for this call. The model the conversation is on reads its cached prompt at the cache price. Every other model reads the whole prompt at the input price.
- It picks the lowest-priced model for the class. Each class has a minimum model tier, as in v1.6.
A first call has nothing to keep, so v2.0 picks as v1.6 does. Our benchmark replays single calls, so its pass rates and costs are the same as v1.6's.
Limits
- A chat in Nexus already kept its model. v2.0 adds the same behavior to API calls, such as an agent or a script.
- Claude models are not held yet. Anthropic caches only the parts of a prompt that a request marks, and an API call through Auto marks none today. So Auto counts no cached read for Claude models, and a Claude pick switches as in v1.6.
- The reasoning effort does not change yet. A later version will try a lower or higher reasoning effort on the same model before it switches models.
- 5 minutes. A conversation that pauses for longer than 5 minutes starts fresh, as the provider's cache does.
Get started
- Set
modeltonexus/autoin an API call, or pick Auto in the model picker. - Keep the system message and the first user message the same across an agent's calls. Auto then sees one conversation.
- See every Auto version in the Auto Router changelog.