SwitchyardAI coding gateway
Every AI coding call, metered and on the right model.
Your engineers run several AI coding tools, and every one asks for the biggest model, autocomplete included. Switchyard sits between every tool and every model.

Engineering teams run five AI coding tools, and every one sends every call to the biggest model, autocomplete included. Nobody could say which tool, engineer or team the bill came from.
One gateway every tool points at. It meters every call's tokens and cost by tool, engineer and team, routes each call to the cheapest model that can do it, and holds teams to their budgets.
How it works
Point every tool at one gateway
Claude Code, Codex, Cursor, Devin and Antigravity each take a custom base URL and key, so they route through Switchyard without changing how anyone works. Its policy file names all five.
README.md Claude Code ─┐ ┌─▶ frontier (planning, long context) Codex ───────┤ │ Cursor ──────┼──▶ SWITCHYARD ──route─┼─▶ standard (agentic edits with tools) Devin ───────┤ meter · policy │ Antigravity ─┘ budget · audit └─▶ small (autocomplete, commit messages, lint fixes)
Each call onto the right track
Plans go to a frontier model, agentic edits to a standard one, autocomplete and commit messages to a small one. The rules are a file you can read.
config/policy.json "tiers": { "frontier": { "anthropic": "claude-opus-5-5", "openai": "gpt-5" }, "standard": { "anthropic": "claude-sonnet-5-5", "openai": "gpt-5-mini" }, "small": { "anthropic": "claude-haiku-4-5", "openai": "gpt-5-nano" } }, "routing": { "smallMaxInputTokens": 2000, "frontierMinInputTokens": 60000, "smallTasks": ["autocomplete", "commit_message", "summarize", "rename", "docstring", "lint_fix", "explain"], "frontierTasks": ["plan", "architecture", "debug_hard", "migration"], "honourPinnedModels": true }
Every token, by tool, engineer and team
The dashboard streams each call as it is routed: the model asked for, the model used, and what it cost.

Teams held to their budgets
Each team has a monthly budget on the dashboard, and spend per ticket and PR can be posted back to GitHub, Jira, Linear or ClickUp.

The last calls of the month, as they were routed
Thirteen calls from the projected month the dashboard opens on: which tool sent each one, the model it asked for, the model it got, and the rule that decided.
| UTC | Tool | Team | Task | Asked for → routed to | Rule | Tokens | Cost | Unrouted |
|---|---|---|---|---|---|---|---|---|
| 17:59:55 | Product | autocomplete | task "autocomplete" is routine | 1.6k | $0.0003 | $0.0072 | ||
| 17:59:51 | Platform | · | agentic edit with tools | 47.7k | $0.0130 | $0.0652 | ||
| 17:59:46 | Platform | · | small edit (32,530 tokens), aggressive policy | 33.4k | $0.0371 | $0.1853 | ||
| 17:59:42 | Mobile | · | small edit (32,006 tokens), aggressive policy | 32.5k | $0.0345 | $0.1726 | ||
| 17:59:37 | Mobile | autocomplete | task "autocomplete" is routine | 1.2k | $0.0003 | $0.0075 | ||
| 17:59:33 | Mobile | · | claude-opus-5-5kept | long context (87,520 tokens) | 88.5k | $0.4611 | · | |
| 17:59:28 | Product | plan | claude-opus-5-5kept | task "plan" needs frontier reasoning | 23.6k | $0.1200 | · | |
| 17:59:24 | Product | · | agentic edit with tools | 48.8k | $0.1490 | $0.2483 | ||
| 17:59:19 | Platform | · | general request | 3.7k | $0.0020 | $0.0102 | ||
| 17:59:15 | Product | summarize | task "summarize" is routine | 8.5k | $0.0105 | $0.0527 | ||
| 17:59:10 | Mobile | lint_fix | task "lint_fix" is routine | 2.6k | $0.0028 | $0.0141 | ||
| 17:59:06 | Platform | autocomplete | task "autocomplete" is routine | 1.6k | $0.0003 | $0.0072 | ||
| 17:59:01 | Platform | · | agentic edit with tools | 43.1k | $0.0117 | $0.0587 |
The 17:59:46 Claude Code call, through route() in src/router.ts
- 1Team over budget?Platform: $2,366.83 of $40,000 this monthno
- 2Model pinned by the caller?no x-switchyard-pin headerno
- 3A frontier task?plan, architecture, debug_hard, migration: no task sentno
- 4Long context?32,530 input tokens, under 60,000no
- 5A routine task?autocomplete, commit_message, summarize…: no task sentno
- 6A small edit with tools?32,530 tokens, within 40,000 (aggressive policy)yes
- Routed to
- claude-haiku-4-5 (small)
- Cost
- 32,530 × $1/M + 905 × $5/M = $0.0371
- On the model it asked for
- 32,530 × $5/M + 905 × $25/M = $0.1853
- Ticket
- jira:PLAT-1440, stored on the call as its ref
AI spend for jira:PLAT-1440 (Switchyard) 19,702 calls · 456.57M tokens · $1182.46 after routing ($1918.54 unrouted, $736.07 saved) - claude-code: $690.00 - devin: $305.36 - antigravity: $143.35 - codex: $24.32 - cursor: $19.44
The comment it posts to the ticket, for every call on it this month.
In numbers
- $72kyearly saving
- 39%cheaper than unrouted
- 158kcalls routed monthly
For a team of 24 engineers making about 158,000 calls a month, at standard model prices. Routing small edits to small models too saves $6,005 (38.8%) a month; the default rules save $5,051 (32.6%).
Built with
TypeScript
Node.js
- SQLite
MCP
OpenTelemetry
Docker
Kubernetes
Connects to
Claude Code
Cursor
- Codex
Devin
Antigravity
Anthropic
- OpenAI
GitHub
Jira
Linear
ClickUp
The film
Switchyard
One gateway for every coding agent. It meters each call by tool, engineer and team, and routes it to the cheapest model that can do it.