Skip to content

Routing and reliabilityComparison

OpenRouter Auto Router and Auto Code: when to let a router choose

OpenRouter relaunched Auto Router on November 6 and added Auto Code for coding harnesses. Both choose the model for you, which is a different bargain from rules you write yourself. This comparison covers control, auditability, cost predictability and failure behavior, with code to log the answering model and pin it.

By INFRO Editorial

Published

9 min read

Luminous routing paths connecting one application node to many AI model endpoints

In short

Let a vendor-run router choose when traffic is varied, no single model is clearly right, and you can bound the pool and log the answering model on every call. Keep explicit routing rules where you must name the model in an audit, forecast a unit cost, or reproduce an answer path. 1

Key takeaways

  • Auto Router and Auto Code choose both the model and the reasoning effort per request, so the model that answered is data you must record, not a setting you control.
  • Bound the pool with allowed and excluded model lists and a cost tier, and treat a release that shifts default cost behavior as a change to re-forecast.
  • Log the response's model field on every call and turn on router metadata where you need the reason; cached replays carry no metadata.
  • Keep explicit routes for workloads that need a named model in an audit, a stable unit cost or a reproducible failover path, and let a router handle the varied, low-stakes remainder.

What changed on November 6

On November 6, 2026 OpenRouter relaunched Auto Router (openrouter/auto) and added Auto Code (openrouter/auto-code), a router tuned for coding harnesses. Both weigh eleven factors about each request against live pricing, provider health, benchmarks and cache state, then pick a model and a reasoning effort from the pool your governance policies allow.1 The slug is unchanged, and the cost_tier, allowed_models and excluded_models settings still work.1

This post is about the decision that follows for a platform team: do you send a workload to a router that chooses the model, or write the choice down yourself as routing rules over connections you hold? It is a different question from the one in OpenRouter's speed-and-reliability default, which covers provider selection. Here the thing being chosen is the model.

Two layers matter, and OpenRouter separates them. Model routing picks which model handles the request. Provider routing then picks who serves that model, using your provider preferences, uptime, latency, price and prompt cache state.1 Everything below concerns the first layer.

How the router decides, and what you can bound

The documented flow has five steps. The pool is narrowed first: guardrails, zero data retention, model capabilities, provider restrictions, BYOK keys and your allowed and excluded lists decide which models are candidates. A fast decision model then rates the request in one call. The routing policy weighs that rating against live prices, cache status and benchmarks, within your cost tier. The request goes through ordinary provider routing. Signals from each turn feed the next.2

That gives you three levers, all coarse:

  • Pool. allowed_models and excluded_models decide who may be picked. The docs have a pattern syntax section; read it before relying on wildcards.2
  • Cost tier. cost_tier shifts where in the price range the router aims. OpenRouter says it moved Auto's default pricing closer to where it was a few months earlier to bring in more model variety, and that cost_tier: low restores similar cost behavior to the previous release.1
  • Slug. Auto Router favors a cost-efficient tier; Auto Code starts in a higher tier and weighs measured pass rate, speed and cost per solved task.1

One trap: openrouter/auto-beta is the release channel where changes land before they graduate to openrouter/auto, and it reads settings only under the plugin id auto-beta-router. Settings sent under the other slug's plugin id are accepted but silently ignored.2 A copied config that names the wrong id gives you an unbounded pool and no error.

You do not get a lever for "always this model for this customer." That is what rules are for.

Control: a pool you bound versus a route you write

With a router, you describe constraints and the vendor's policy picks within them. With explicit rules, you describe the outcome. INFRO's routes are the second shape: a route is a stable name your application sends as model, resolving to an ordered or weighted list of your own provider connections and the model each should serve. A route can carry up to 20 if-rules, checked in order, the first match deciding.3 Conditions read request metadata, feature, end user, key, project, streaming, images, tools, prompt size, and time of day.3

rule on a route
{
  "name": "Long prompts from gold tier",
  "match": "all",
  "conditions": [
    { "field": "metadata", "key": "tier", "op": "in", "value": ["gold", "platinum"] },
    { "field": "input_tokens", "op": "gt", "value": 50000 }
  ],
  "targets": [{ "connection_id": "conn_…", "model": "openai/gpt-6-sol" }],
  "fallthrough": true
}

That rule is the shape from INFRO's docs; the tier values are illustrative.3 Every request that matches goes to the named model, and a reviewer can read the file.

There is a middle path. INFRO's prompt classifier lets a decision model pick a class per prompt, and route rules send each class to its own targets, with a fallback class when the classifier is unsure or unreachable. The model still has to be named by you per class, so the judgment is automated but the destination is not.

OpenRouter also offers an explicit layer: presets store model selection, provider preferences, parameters and prompts under a name such as @preset/code-reviewer, which you can change without a deploy.4 Pinning is therefore available on the same platform; the router is opt-in per slug.

Auditability: recording which model answered

A router makes the answering model a runtime output. For audit, three records matter: the model that served, the reason, and the attempts.

The response's model field names the model that was selected.2 For the reason, send X-OpenRouter-Metadata: enabled. The response then carries openrouter_metadata with the requested slug, the strategy (auto, direct, fallback and others), the attempt number that succeeded, whether the request used a BYOK key, the candidates considered, and per-attempt status. The Auto Router docs say the jev-router stage in the pipeline lists the routed candidates with reasoning effort, estimated cost and the reason for the pick.52 For streaming, the metadata arrives on the final chunk before data: [DONE].5

log_answering_model.py
import json, logging, requests

log = logging.getLogger("llm.audit")

def ask(prompt: str, route_slug: str = "openrouter/auto") -> str:
    r = requests.post(
        "https://openrouter.ai/api/v1/chat/completions",
        headers={
            "Authorization": "Bearer <OPENROUTER_API_KEY>",
            "X-OpenRouter-Metadata": "enabled",
        },
        json={"model": route_slug,
              "messages": [{"role": "user", "content": prompt}]},
        timeout=60,
    )
    r.raise_for_status()
    body = r.json()
    meta = body.get("openrouter_metadata") or {}
    log.info(json.dumps({
        "requested": route_slug,
        "served_model": body.get("model"),
        "strategy": meta.get("strategy"),
        "attempt": meta.get("attempt"),
        "is_byok": meta.get("is_byok"),
        "summary": meta.get("summary"),
    }))
    return body["choices"][0]["message"]["content"]

Write served_model into the same record you use for cost, because the price follows it. On your side of an explicit route the equivalent is already a record: INFRO's request log stores the model, the selected provider connection, the outcome, timings, usage and estimated provider cost, and the trace names the route and the connection that served it.63 The model is known before the call, so the log confirms rather than discovers.

Cost predictability: a price that moves with the policy

The router adds no fee: you pay the standard price of whichever model serves, and the response says which one.1 The predictability problem is elsewhere. The policy weighs live prices, so the same prompt can land on different models on different days, and OpenRouter has already changed Auto's default cost posture once to widen variety.1 Fallbacks behave the same way: a request is priced at the model ultimately used, which a free model falling back to a paid one makes plain.7

Restraint helps in one case. OpenRouter says the router tries to protect caching by changing reasoning effort before switching models, and that in its beta it stayed on one model for nearly nine of every ten agent turns.1 That is a vendor measurement on its own traffic; check the switch rate on yours.

Practical controls: bound the pool so the most expensive model you cannot afford is excluded, set the tier, put a hard cap on the key or project, and re-forecast when the vendor announces a router release. On INFRO, budgets set a hard cap per organization, project, member and key with alerts at your thresholds, and the same limits apply whichever model answers.

Failure behavior: who retries, and on what

Router and fallback behavior differ in kind. A router can change model because a session is going badly: OpenRouter says repeated errors or failing tests after an edit raise the odds of a switch.1 A fallback list changes model on error: the models array tries the next model if the first returns an error, including context-length validation errors, moderation flags, rate limits and downtime, and the Messages-style fallbacks list accepts at most three entries.7 When the router metadata is on, attempt greater than 1 tells you earlier attempts failed.5

Narrowing the pool can also remove every candidate. The metadata docs list a "No Providers Available (404)" and a "Guardrail Blocked (403)" error case, so a tight exclusion list plus a guardrail can turn into a hard failure rather than a downgrade.5 Test it before production.

INFRO's rule is stricter and narrower. A route retries the same target 0 to 3 times, then moves on when a provider 4xx, 429, 5xx or timeout happens before the response starts; failure rules can set retry, move on or stop per failure kind. Once a stream has started it is not restarted on another target, and INFRO's own refusals (authentication, budget, allowlist) never fail over.8 Every fallback is a model you listed. What the docs I read do not state is how the Auto Router behaves if its own rating call is slow or fails; ask OpenRouter or test it with fault injection.

Side by side

QuestionVendor-run auto routerExplicit rules on your own connections
Who names the modelThe router, within your poolYou, per route and rule
Audit evidencemodel field, plus opt-in metadata for reason and attemptsModel fixed in config; request log confirms it
Cost forecastA distribution of served modelsA rate per target
Policy changesVendor ships new generations; one already moved default cost postureChange when you change the route
Failure pathProvider routing, fallback lists, session signalsYour ordered targets and failure rules
Best fitMixed traffic, agents, teams without time to track releasesRegulated, billed-per-customer, or reproducibility-critical paths
What each approach leaves to you.

When to let the router choose

OpenRouter's own framing is candid: no router beats the single best frontier model at every point on the cost and quality curve, routers earn their place when work is varied, and if you know the model that works best for your work, keep using it.1 That is a useful test.

Let a router choose when:

  • the traffic is a mix of task types and difficulty, and no single model is right for most of it;
  • the output is reviewed by a person or checked by tests, so a wrong pick is caught;
  • you can bound the pool and cap spend, and your finance process accepts a mix rather than a rate;
  • the team lacks the time to re-evaluate each release, which is the situation Auto Code is aimed at for coding agents.

Keep explicit rules when:

  • a contract, regulator or customer requires naming the model that processed the data;
  • you bill end customers per request and need a stable unit cost;
  • you rely on fallback equivalence you have tested, as in testing fallback models;
  • you need to replay a request and expect the same path.

Most teams end up with both: explicit routes for the revenue and compliance paths, a router for internal tools and coding agents. Pin by sending a named model or preset instead of the router slug, log served_model from day one, and compare a week of router traffic with your pinned baseline before widening it.

Questions readers ask

Does a cached replay tell me which model answered?
Not through router metadata. OpenRouter documents that cache hits never include openrouter_metadata, so that field is absent on replays and you should not build audit logic that assumes it is always present. 5
Is the response's model field enough for an audit trail?
It records which model served the request, which is the minimum an audit needs. It does not record why the router chose it, the candidates it weighed or earlier failed attempts; those come from the opt-in metadata. 2

From the team that builds it

Where this shows up in INFRO

INFRO is a control plane in front of the provider accounts you already hold. The capabilities below are the parts of it this article touches, each with the documentation that defines its behaviour.

INFRO accounts are self-serve. Provider usage is billed to you by your providers; INFRO charges a software subscription and takes 0% of model spend. See plans.

Sources

Numbered in order of first citation. Each was opened and checked against the claim on the date shown.

  1. 1.Introducing the New Auto and Auto Code Routers (opens in a new tab) — OpenRouter. Accessed Nov 8, 2026.
  2. 2.Auto Router - openrouter/auto (opens in a new tab) — OpenRouter. Accessed Nov 8, 2026.
  3. 3.Routes (opens in a new tab) — INFRO. Accessed Nov 8, 2026.
  4. 4.Presets (opens in a new tab) — OpenRouter. Accessed Nov 8, 2026.
  5. 5.Router Metadata (opens in a new tab) — OpenRouter. Accessed Nov 8, 2026.
  6. 6.Request traces (opens in a new tab) — INFRO. Accessed Nov 8, 2026.
  7. 7.Model Fallbacks (opens in a new tab) — OpenRouter. Accessed Nov 8, 2026.
  8. 8.Smart routing (opens in a new tab) — INFRO. Accessed Nov 8, 2026.

About this article

Read on 2026-11-08: OpenRouter's November 6 Auto and Auto Code announcement, its Auto Router, Router Metadata, Model Fallbacks and Presets docs, and INFRO's Routes, Smart routing and Request traces docs. OpenRouter's benchmark figures, the Auto Code cost comparison and the pattern syntax for allowed models were left out as not independently confirmed here.

Last checked against its sources on . The next review is due by . No separate named reviewer is recorded for this article.

How articles are written, sourced and corrected is set out in the editorial standards.