Case study · July 29, 2026
The router that turned six coding tasks into a five-cent bill
Six real coding tasks, 91 of 91 pytest tests passing, total spend via Reality Router — 5.4 cents. That is 170× cheaper than the same tokens on Claude Opus 5.
I gave an AI agent six real coding tasks — fix bugs, write missing functions, add test coverage, refactor duplicated code. Different files, different bugs, different shapes. All in one automated overnight run on the 8 GB Jetson sitting on my desk.
Total wall time: 31 minutes. Total tests passed: 91 / 91. Total cost: $0.054.
Five and a half cents.
On Claude Opus 5, the same token volume would have cost $9.20. On GPT-5, $2.63. On Claude Sonnet 5, $3.68.
Reality Router picked cheaper models that turned out to be perfectly capable of every one of those jobs — the pytest suite for each task ran green from a fresh broken state, no human intervention.
The six tasks
Not toys. Real code with real bugs and real success signals.
| # | Task | Result |
|---|---|---|
| 02 | Fix bugs in a string-utils library (slugify, word_count, truncate) | 16/16 tests pass |
| 03 | Fix regex bugs in email/URL/phone validators | 15/15 tests pass |
| 04 | Implement a missing smart-titlecase function per spec | 8/8 tests pass |
| 05 | Write a complete test suite for an untested calculator library | 21/21 tests pass |
| 06 | Refactor 3 near-identical report generators into a shared helper | 4/4 tests pass, code shortened |
| 07 | Mixed complexity: trivial typo + medium bug + heavy new feature in one module | 15/15 tests pass |
The cost breakdown
Real spend, real tokens, published price sheet from LiteLLM's canonical model registry:
| Task | Actual (via RR) | If it had gone to GPT-5 | If it had gone to Claude Opus 5 |
|---|---|---|---|
| 02 fix-string-utils | $0.0112 | $0.32 | $1.62 |
| 03 validate-data | $0.0087 | $0.24 | $0.98 |
| 04 implement-titlecase | $0.0087 | $0.25 | $1.02 |
| 05 write-tests | $0.0082 | $0.28 | $0.79 |
| 06 refactor-dedup | $0.0083 | $0.23 | $0.93 |
| 07 mixed-complexity | $0.0092 | $0.28 | $0.91 |
| Total | $0.0543 | $2.63 (48× more) | $9.20 (170× more) |
Same work. Same test outcomes. 170× cheaper via the router. The only difference is who picked which model.
What the router actually did
Every call across all six tasks got routed to a lower-cost model that could still handle the job cleanly. Not because I told it to — I didn't. Reality Router's ranker looked at each request, weighed cost against quality against latency against my declared preference (I have the slider set toward cost priority), and picked the cheapest model that would reliably deliver.
The router's pick landed in the sweet spot: capable enough to pass every test, cheap enough to make the total bill negligible.
Why this matters
Every AI-coding tool people use today — OpenCode, Aider, Cursor, Claude Code, custom scripts — takes one API key and one default model. You pick something you trust to handle your hardest prompts, and every trivial prompt eats that same premium rate. That's how a Sonnet-capable dev workflow becomes a $200/month bill.
Point that tool at Reality Router instead, and routing happens per request. In OpenCode, that's a one-line config change:
{
"provider": {
"reality-router": {
"options": { "baseURL": "http://localhost:8000/v1" }
}
}
}
Same OpenCode you already run. Same API keys you already own. New line of sight to your actual per-task spend.
Try it yourself
Reality Router is open source. Docker one-command install, plug in your own API keys, point OpenCode (or Aider, or anything OpenAI-compatible) at it, watch your bill for a month.
Prices from LiteLLM's canonical model_prices_and_context_window.json as of 2026-08-09.