cd /news/ai-agents/auto-code-open-router · home › topics › ai-agents › article
[ARTICLE · art-164930] src=openrouter.ai ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Auto Code – Open Router

OpenRouter released Auto Code, a router built specifically for coding agents and harnesses that uses the same routing engine as the Auto Router and treats every request as part of an agent session. Auto Code selects models by coding-task pass rate, completion time, and cost per solved task, tracking edits, test results, and recurring errors across turns to keep a model while work is going well and to try more reasoning effort before switching when trouble persists. The router has no fixed price of its own — each request is billed at the price of the model that serves it — and can route to models with context windows of up to 2,000,000 tokens, accepting text, images, audio, PDFs, and video as input and returning text and images.

read2 min views2 publishedNov 5, 2026
Auto Code – Open Router
Image: source

Auto Code is OpenRouter’s router built specifically for coding agents and harnesses. It uses the same routing engine as the Auto RouterOpens in new tab, with every request treated as part of an agent session and model choices guided by coding-task pass rate, completion time, and cost per solved task.

It follows edits, test results, and recurring errors across turns, keeping the model while work is going well and trying more reasoning effort before switching when trouble persists. Its default coding tier starts from stronger models and weighs failed code changes more heavily. Your model and provider restrictions still apply.

Explore actual agent usage and how the router chooses models for new work.

API

Drop-in code to call this model. OpenRouter's API is OpenAI-compatible — most SDKs work by just swapping the base URL. The only thing that changes between models is the model slug below.

Auto Code is OpenRouter’s router built specifically for coding agents and harnesses. It uses the same routing engine as the Auto Router, with every request treated as part of an agent session and model choices guided by coding-task pass rate, completion time, and cost per solved task.

Where is the Auto Code documentation?

The Auto Code documentation on OpenRouter includes the Auto Router guide. The quickstart covers API keys and your first request, and the API reference lists every parameter.

How much does Auto Code cost?

Auto Code has no fixed price of its own. Each request is billed at the price of the model that serves it, so your cost depends on which model the request is routed to.

What is the context length of Auto Code?

Auto Code can route to models with context windows of up to 2,000,000 tokens. The context length available to a request is that of the model that serves it.

What inputs and outputs does Auto Code support?

Auto Code accepts text, images, audio, files such as PDFs, and video as input and returns text and images.

── more in #ai-agents 4 stories · sorted by recency
── more on @openrouter 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/auto-code-open-route…] indexed:0 read:2min 2026-11-05 · —