The right model for every coding task.
spawn classifies each task on-device and routes it to the model that fits, across Claude Code and Codex. Frontier quality where it matters, frontier prices only where they're earned.
Rides the Claude and ChatGPT plans you already pay for.
Every task goes to whatever model you opened the harness with.
Usually the strongest one. A typo fix, a rename, a doc tweak: all billed at flagship rates, because switching models by hand forty times a day is a thing nobody actually does. When you work across two agents, Claude Code here and Codex there, there's no shared notion of the right model for the job. The models aren't the problem. The routing is.
Five real tasks. The same results for 65% less.
Watch one session route itself. Four of these tasks never needed a flagship model, so they didn't get one. Only the auth redesign did.
A tiny classifier that runs before the first token.
It reads the task on-device, in about 55ms.
A small ONNX classifier runs locally the moment you submit. Zero API tokens spent. It outputs durable properties, not a model name: task_type, complexity, risk. The ontology stays stable even as models come and go.
# classify "fix the wrong copyright year" { task_type: "bugfix" · 0.94 complexity: "easy" · 0.88 risk: "low" · 0.91 }
Your config turns those into a model and effort.
A plain JSON file owns the routing: named tiers plus ordered rules, first match wins. Every target is a model, effort atom, so easy work drops to the cheapest tier and anything risk: high is bumped to the top. New model ships? Edit one line. No retraining, no waiting on us.
{
"routing": {
"tiers": {
"small": "claude-haiku-4-5, low",
"mid": "claude-sonnet-4-6, medium",
"large": "claude-opus-4-8, high"
},
"rules": [
{ "when": { "complexity": "easy" }, "use": "small" },
{ "when": { "task_type": "migration" }, "use": "gpt-5.5, high" },
{ "when": { "risk": "high" }, "use": "large" }
]
}
}Works with the agents you already use.
spawn runs a local gateway and points your harness at it. By default it rides the Claude and ChatGPT subscriptions you already pay for; pass --api-keys to bill usage-based keys instead. Same tool loop, same agent UX. The only thing that changes is which model answers each turn.
Claude Code
Routed through ANTHROPIC_BASE_URL. Claude Code keeps planning, editing, and running tools exactly as before.
$ spawn enable claude-code ✓ gateway listening on :4505 ✓ ANTHROPIC_BASE_URL → spawn $ claude "fix the wrong year in the footer" ↳ routed → haiku-4.5 ($0.04)
Codex
Wired through Codex's model provider base_url. The route is chosen before the turn ever leaves your machine.
$ spawn enable codex ✓ patched ~/.codex/config.toml ✓ model_provider → spawn (base_url) $ codex "migrate the test suite to vitest" ↳ routed → gpt-5.5 (migration · hard)
Next: an orchestrator, built around the router.
The gateway is the product today. The same routing will drive spawn's own terminal app: parallel agents on a shared queue, rate-limit failover, one route decided per task. This is where it goes next, not what you install now.
Any model, one router
Route across Anthropic, OpenAI, xAI and local models. Not just one vendor's tiers.
Shareable presets
Drop-in profiles that map tasks to the right Claude and Codex models out of the box.
Parallel + failover
Fan out agents on a shared queue, with automatic failover when a provider rate-limits.