Disclosure: CodeRouter is our product, a router for coding agents. Everything below about OpenRouter is quoted or summarized from OpenRouter's own announcement and documentation, checked on November 9, 2026, with links. Where we describe CodeRouter, we say so.
On November 6, 2026, OpenRouter announced a rebuilt Auto Router and a new router "specialized for coding work": Auto Code, model ID openrouter/auto-code. If you run Claude Code, Codex, Cursor or your own agent harness through OpenRouter, it is the model string that lets OpenRouter choose the model for each turn.
This post explains what it does, what it costs, how to call it, and where it fits.
What Auto Code is
OpenRouter has three members in its Auto Router family (docs):
| Model ID | What it is for (OpenRouter's description) |
|---|---|
openrouter/auto |
"A general purpose router that picks a model and reasoning effort for every request" |
openrouter/auto-code |
"specialized for coding agents and harnesses" |
openrouter/auto-beta |
"the experimental release channel" for Auto Router changes |
Auto Code "runs on the same routing engine as the Auto Router, with a policy tuned for coding work" (Auto Code docs). OpenRouter lists three differences:
- "It starts in a higher cost tier that includes stronger coding models."
- "It weighs speed more heavily."
- "It penalizes failures more harshly, so it course corrects faster when tests fail or the same error comes back."
How it picks a model
The docs describe five steps:
- Narrow the model pool. Guardrails, zero data retention, model capabilities, provider restrictions, BYOK keys and your allowed and excluded model lists decide which models are considered.
- Rate the request. "A fast decision model rates the turn, for example what kind of coding task it is, whether the task just changed, how hard it is, and whether a bigger model or more thinking would help." The announcement says the routers weigh "eleven factors about each request".
- Pick a model and effort. "The routing policy weighs measured pass rate, speed, and cost per solved task across models and reasoning efforts, plus live prices and cache status."
- Route to a provider, through the same provider routing a direct request to that model would use.
- Carry signals to the next turn. Auto Code "favors a change in reasoning effort over a model switch, so it keeps your prompt cache, and switches when failure signals show the model is the problem."
Two details matter for coding agents:
- The cache. "Switching models costs extra while the new model rebuilds the prompt cache, so the router is restrained about it" (Auto Router docs). In OpenRouter's beta, the Auto Router "stayed on the same model for nearly nine of every ten agent turns" (announcement).
- Sessions. OpenRouter recognizes a conversation "from an explicit
session_id, or from a fingerprint of your messages if you don't send one", and sessions also keep requests on the same provider (session stickiness). For agent harnesses, the Auto Code docs recommend sending asession_idor thex-session-idheader.
What OpenRouter reports about results and speed
From the announcement, in OpenRouter's words:
- "Auto Code scores in line with Claude Opus 5.5 while costing 74% less per task", on a benchmark set that includes Deep SWE, SWE-Atlas QA, Terminal Bench 4.0, τ³-bench Banking and MMMU Pro Vision. Per-benchmark scores are on OpenRouter's router benchmarks page.
- The routing step is "3× faster at the p90 in our live test (0.65s against 1.96s)" than the previous router.
These are OpenRouter's measurements; we haven't reproduced them.
What it costs
- No router fee. "You pay the standard price of whichever model serves each request. Auto Code doesn't add a fee." (Auto Code docs)
- Model prices are passed through. OpenRouter's FAQ: "We pass through the pricing of the underlying providers without any markup."
- Platform fee on credits. OpenRouter's pricing page lists a platform fee of 5.5% on the pay-as-you-go Standard plan and 8% on Business; Enterprise has fee discounts.
So the cost of an Auto Code session is the sum of what each chosen model charges for its turns, plus the platform fee on the credits you buy. Because the model can change from turn to turn, the per-turn price isn't fixed in advance. The model field of each response tells you which model answered.
OpenRouter's pricing page also covers the BYOK allowance and free-model limits; our CodeRouter vs OpenRouter page puts the fees side by side.
How to call it
Use openrouter/auto-code wherever your harness takes a model string. A minimal Chat Completions request (with your own key in OPENROUTER_API_KEY):
curl https://openrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-H "Content-Type: application/json" \
-H "x-session-id: my-agent-session-42" \
-d '{
"model": "openrouter/auto-code",
"messages": [{"role": "user", "content": "Fix the off-by-one error in utils/paginate.ts"}]
}'
Restricting the models. Auto Code applies the allowed_models and excluded_models lists of the auto-router plugin as hard restrictions:
{
"model": "openrouter/auto-code",
"messages": [{"role": "user", "content": "Split this module into smaller functions."}],
"plugins": [
{ "id": "auto-router", "allowed_models": ["anthropic/*", "openai/*"] }
]
}
Lists saved on your workspace's Routing page apply too. If the restrictions leave no eligible model, the request fails with 404 and names the fields to change. Auto Code ignores the auto-router plugin's cost_tier and runs on its own coding tier; the Auto Code docs show how to route a request on a general tier (low, medium or high) instead.
Seeing the decision. Send X-OpenRouter-Metadata: enabled to get router metadata: the routing stage lists the resolved models, the candidates with their reasoning effort and estimated cost, and the reason for the pick. In OpenRouter's chatroom, a routing insights panel shows the same analysis.
Limits the docs mention for the Auto Router family: it "requires conversational input", it is "available only in the global data region", and you shouldn't combine openrouter/auto with another router model in the same request.
When Auto Code fits
From OpenRouter's description, Auto Code makes most sense when:
- you already use OpenRouter credits and want one model string instead of picking per task;
- you want the router to choose across a wide pool (OpenRouter's catalog, narrowed by your allowed models and data settings);
- you want reasoning effort chosen per turn as well as the model.
Check two things on your own traffic, whatever router you use: what whole sessions cost compared with the single model you'd otherwise use, and how often the model changes mid-session. We wrote a checklist for that: What to measure before you pick a coding router.
How CodeRouter's approach differs
Briefly, and only about our own product:
- Built for coding work only, four fixed tiers: Claude Haiku 5.5, Kimi K2.6, Claude Sonnet 5.5 and Claude Opus 5.5. A small judge model reads the latest message and tool results; code picks the tier. For non-coding chat, a general-purpose router fits better.
- Coding-agent sessions (Claude Code, Codex CLI, Cursor's agent) get their model once, at the start of the session, and move up (never back down) only when a code change fails its tests or the agent stops making progress. The exact rules are published in our llms.txt.
- Pricing: pay as you go at model list price +8% from a prepaid balance, with smart routing or Direct mode (you name the model) on the same account; Team is $19 per developer a month plus usage at list +8%, with budgets per member and project.
- See a route before you sign up: the Playground previews which model a task would start on, without an account.
The side-by-side table is on CodeRouter vs OpenRouter.
FAQ
What is OpenRouter Auto Code?
A model router on OpenRouter, model ID openrouter/auto-code, "specialized for coding agents and harnesses". It picks a model and a reasoning effort for each turn.
Is OpenRouter Auto Code free? The router adds no fee. You pay the standard price of whichever model answers each turn, plus OpenRouter's platform fee on credits (5.5% on Standard, 8% on Business, per its pricing page).
What's the difference between openrouter/auto and openrouter/auto-code?
Same engine; Auto Code uses a policy tuned for coding: a higher starting cost tier with stronger coding models, more weight on speed, and harsher penalties for failures.
Does Auto Code break the prompt cache? OpenRouter says it favors changing reasoning effort over switching models and switches only when failure signals point at the model; in its beta the Auto Router stayed on the same model for nearly nine of every ten agent turns.
How do I see which model it picked?
The model field of each response, or full router metadata with the X-OpenRouter-Metadata: enabled header.
Sources, checked November 9, 2026: OpenRouter announcement, Auto Code docs, Auto Router docs, OpenRouter pricing, OpenRouter FAQ. OpenRouter may change these; check its pages for current terms.