v0.3.6 · MIT · 5 backends · 3 meters · open benchmark data · every path live-tested

You're paying for AI by the token.
Your PC already has some for free.

multi-model-routing is a skill that stops your coding agent from spending premium quota on grunt work. Bulk, mechanical jobs go to the Local model engine with the largest usable model inventory — then Codex, Antigravity, and Claude — across three separate meters, in cost and privacy order.

View on GitHub Read the manual

The problem, in plain English

Ask a coding agent to summarize 200 log files and it will happily do all 200 itself, at premium rates, using a model built for architecture and security review. The work is mechanical — read a file, write two sentences — but every one of those calls bills you like it was hard.

Meanwhile there's a good chance you already have a local model engine installed, holding models that run free, offline, and unmetered, doing nothing.

This skill closes that gap. It teaches the agent to recognize bulk work and route it down to the cheapest backend that can actually do it — with one hard rule attached: local output is raw material, never a finished answer. Something better always reviews it before it counts.

The ladder

cost → Local largest usable roster free · private OpenCode Zen no key, no account free · cloud Codex OpenAI models your quota Haiku bulk, on Claude cheap tier Premium Claude reasoning · review reserve it Escalate only when the tier below fails review twice — never loop in place. Privacy, honestly: only the first tier keeps data on your machine. Everything right of it is somebody's cloud — Claude included. So pick on cost, and keep genuinely sensitive material local.
Cost rises left to right. Work starts at the cheapest tier that can do it. Only the leftmost box keeps your data on the machine.

Why "never ships unreviewed" isn't boilerplate

That rule sounds like standard caution. It isn't — it's load-bearing, and we measured it.

On 2026-08-08 the same adversarial code audit was routed to the two cheaper tiers, and then every finding either backend produced was checked by hand against the source it was shown:

BackendCostFindingsActually realTime
Local 7B coder$010~172 s
Codex25,122 tok6534 s

The local model didn't just miss things — it invented them. Two of its ten findings were flatly contradicted by the code sitting in its own prompt: it reported a missing usage message in a script that prints one, and an unhandled error case that's handled two lines later.

Now the same model on work it's actually suited to

A real batch: twelve log files, classify each as an authentication failure, another error, or clean — with a known correct answer for all twelve.

JobBackendResultCostTime
Adversarial code reviewlocal 7B~1 of 10 findings real$072 s
Classify 12 logslocal 7B12 / 12 correct$027 s

Same model. Same machine. Same day. Catastrophic at judgment, flawless at mechanical classification — every auth failure found, nothing invented, and twelve token receipts proving the calls happened.

That gap is the ladder. A small local model isn't "worse AI" you tolerate to save money; it's a different tool with one sharp edge and one blunt one. Point it at bulk work and it's free and exact. Point it at a judgment call and it will confidently invent things. Route accordingly — and always check its work.

No single agent reaches every model

Claude Code, Codex, and Antigravity each talk to a different fleet. Routing across them is how you reach a model your own harness doesn't offer — often on a different meter than the one you're burning.

SystemCLIReaches
Claude Code / CoworkclaudeClaude tiers, any Anthropic-compatible endpoint
Codexcodexthe GPT-5.x fleet — plus local models, free
AntigravityagyGemini, GPT-OSS 120B, Claude 4.6 on a separate meter
Selected local engineHTTP / CLIlargest usable local model roster
OpenCode ZenHTTPfree models, no API key and no account

Two routes worth knowing. codex exec --oss --local-provider <ENGINE> runs Codex's full agent loop — tooling, sandboxing and all — on free local weights, at zero API cost. Choose <ENGINE> from live CLI help after comparing local model inventories. And agy --json-schema returns schema-validated JSON with a token receipt in about two seconds, which makes it the best structured-batch surface of the lot.

They can drive each other, too

MCP is the common bus. codex mcp-server turns Codex into an MCP server any client can call as a native tool; codex mcp add points Codex at someone else's tools. Both directions were wired and verified on real hardware:

DirectionMechanismVerified
Antigravity → Codexmcp_config.jsonlive round trip, 17.9 s
Codex → Chrome DevToolscodex mcp add20+ browser tools exposed, 21.8 s

Registration is per-agent, not global. Adding a server to Codex does not make it appear in Antigravity or Claude Code — each keeps its own config and each must be wired separately. What you reuse is the server itself, so the second and third registrations are a one-line command rather than new work. Never assume a tool is present because another agent has it.

One gotcha that cost real time: on Windows, prefer the absolute path to the actual executable over a PATH shim, since .cmd wrappers can fail to spawn under stdio MCP.

Both verified by live calls, not read off a help page. One boundary worth stating precisely: your agent calling local models is the core path here and it works — that's what the bundled script does. What doesn't work is replacing an agent's own inference backend with a local server: protocol-compatible, but ~42 s of prompt processing per call on a small model, several calls per turn. Calling local models, yes. Being one, no. Documented as a dead end so nobody re-derives it.

Quick start

Install

git clone https://github.com/scottconverse/multi-model-routing-skill.git
cd multi-model-routing-skill
python3 install.py

The installer auto-detects Claude Code and Antigravity, installs into each, and creates your per-machine notes file from the template — never overwriting one that already exists. --list previews without changing anything; --app claude or --app antigravity targets one; --project DIR installs into a single project.

Or by hand

git clone https://github.com/scottconverse/multi-model-routing-skill.git \
  ~/.claude/skills/multi-model-routing

cd ~/.claude/skills/multi-model-routing
cp references/local-notes.example.md references/local-notes.md

The folder name must be multi-model-routing — that's what SKILL.md's name: field expects, regardless of what the repo is called. The agent picks it up automatically from there; there's nothing to enable. Install it in every harness you use — routing advice only helps the session that can read it.

Then just ask for bulk work

"Summarize every log in this folder." "Tag these 300 rows." "Draft docstrings for all of these." The skill triggers on the shape of the request — a folder, a count, "all of them" — and routes it before reading a single file.

Uninstall

python3 install.py --uninstall     # --list to preview first

Your local-notes.md is preserved beside where the skill was and the path printed — those are measured machine facts, not disposable. Repeat uninstalls get numbered backups; an existing one is never overwritten.

It refuses to delete a git checkout. If you installed by cloning, the install is your working copy — removing it would take your repository history, including unpushed commits. It stops and says so. It also refuses any directory without a SKILL.md, so a mistyped path can't destroy something else. Every install ships its own install.py, so you can uninstall from the install itself.

Model choice is looked up, not guessed

The skill doesn't store rankings — it fetches them. scripts/benchmarks.sh pulls Epoch AI's Benchmarking Hub, a non-profit publishing under CC-BY 4.0: no account, no API key, no redistribution restriction. It caches the data and refetches whenever it's over a week old, so nothing in the skill can rot into a stale number.

It scores open-weights models on the same scale as proprietary ones — the comparison a routing skill actually needs. ⚠️ But open weights means downloadable, not runnable: the top open model is 2.8 trillion parameters and needs 8× H200. Check size against free RAM before treating a high score as a local option, and remember a big open model reached over someone else's API is a licensing win, not a privacy one. Benchmarks rank; they don't decide — a measured result on your own machine still wins.

Large prompts don't go through argv

cat big.log | scripts/call_local.sh <BASE_URL> <MODEL> - 2048

The prompt can be a literal argument, - for stdin, or file:PATH. Use the latter two for real inputs — a literal prompt has to fit the OS argument limit, and a batch input won't. It fails loudly rather than truncating, but it won't run. The sigil is file: and not @ because Git Bash on Windows expands a leading @ as a response file, silently splitting the file's contents into separate arguments.

"Local" doesn't have to mean this machine

The bundled script takes a base URL and has no localhost assumption, so any compatible local-engine endpoint works — including a bigger box on the LAN serving a model that won't fit in your RAM. Follow that engine's documented bind and firewall settings. A remote endpoint is not private — the guarantee comes from localhost, not from the word "local."

You need less than you'd think

Nothing here requires every backend or a particular local engine. It works with whatever subset you actually have, and a missing one is a one-line note, never a blocker. The bundled script needs only bash, curl and python3 — standard library, no pip install.

What gets routed where

Goes local first

Log and JSON triage · file summarization sweeps · test-data generation · format conversion · classification and tagging · first-draft docstrings · commit-message drafts · TODO sweeps. High volume, low stakes, mechanically checkable.

Never routed down

Architecture decisions · security-sensitive code · final audit verdicts · anything shipping unreviewed · judgment calls you'll rely on. These stay on premium Claude, full stop.

receiptsEvery claim that a backend did work is backed by the actual reply or its token-usage line. No "I offloaded that" without evidence.
lazy probingBackends are probed when they're about to be used, not in a sweep on load — and the result is cached for the session.
escalate, don't loopIf a tier fails review twice on the same work, it moves up one. It never burns a third attempt at the same level.
bounded callsLocal calls are capped at 1–2 at a time, time out rather than hanging forever, and treat an empty reply as a failure — not as a successful empty answer.
what, not howSub-agents get the outcome and pick their own route. Prescribing the URL, the query, or a numbered procedure spends tokens writing instructions the agent could derive — and caps the result at your guess.
route the routingDeciding where work goes is classification, and that's the thing small local models measurably nail. On a long sweep a local model can pre-sort the queue for free, so premium tokens go to the work instead of the dispatch.

Honest limits

It does not enforce "local." The bundled script posts to whatever base URL it's given. The name says local; nothing in the code makes it so. Keep it pointed at localhost for private material — that's the caller's job, and the skill says so plainly rather than implying a guarantee it can't keep.

A cloud sandbox is not your machine. If the agent runs in a hosted container, its localhost is the container's, not yours. The skill has an explicit guard for this: if it starts a server and finds an empty model list while you insist you have models installed, it stops and tells you instead of "fixing" it by downloading gigabytes.

Local models are slow to start. First call to a cold model includes load time — 10–15 s is normal for a 5–9 GB model. Warm calls are much faster. Budget for it on the first item of a sweep, not on every one.