Case study · August 5, 2026
How to connect Reality Router to Aider
One flag drops Aider into RR's routing. On a real 384-request stretch, the bill went from $23.90 to $2.10. Same commits, 91% off. Full setup, verification, and a real receipt.
One flag. On a real 384-request stretch, RR cut the bill from $23.90 to $2.10 — same commits, 91% off. Aider audiences already track token cost per PR; this is the shortest path to actually shrinking it.
If you're using Aider, you're already the kind of dev who cares what a coding session costs. Aider itself prints the running total after every message — a habit no other agent has. Pointing it at Reality Router turns that number from "~$4 per feature" into "~$0.40 per feature" — for the same conversations, without switching how you work at all.
Four things happen when you route Aider through RR:
- Per-call model choice. RealitySignal calibrated probabilities pick the right model per step — cheap models handle file summaries and diff parsing, expensive ones only fire when they'll actually improve the change.
- No more model juggling. You've been swapping between
--modelflags to save money. Stop. Set--model openai/autoonce and let RR route. - Cross-session cost visibility. Aider's per-session tally is great; RR gives you the same view across every session, plus latency, success rate, and model distribution.
- Same Aider. Same
/add,/drop,/commit. Same repo-map. Same--edit-format. Just cheaper and more measured.
Here's the whole setup.
1. Point Aider at RR (30 seconds)
Aider gives you three configuration paths — pick whichever fits your workflow. All three do the same thing.
Option A: Command-line flags (one-off)
aider \
--openai-api-base http://localhost:8000/v1 \
--openai-api-key rr-local \
--model openai/auto
Option B: Environment variables (per-shell or in your .zshrc)
export OPENAI_API_BASE=http://localhost:8000/v1
export OPENAI_API_KEY=rr-local
aider --model openai/auto
Option C: .aider.conf.yml (project-scoped, checked into the repo)
openai-api-base: http://localhost:8000/v1
openai-api-key: rr-local
model: openai/auto
Drop that in the repo root (or your home dir for global scope). Now aider in that project uses RR automatically.
Note the openai/ prefix on the model name. Aider's docs require this for any OpenAI-compatible endpoint — it tells LiteLLM (Aider's provider layer) to speak the OpenAI wire protocol against your base URL rather than routing to Anthropic, Gemini, etc.
2. Verify it worked (10 seconds)
Fire up Aider and ask anything:
> what does this repo do?
Then open the RR dashboard at http://localhost:8000. Your Aider call shows up in the Agent Activity table.
What you'll see
Dashboard mid-session, Aider top of the list:
Total Volume: 384 requests. Accrued Expense: $2.10. Potential Cost (if everything had run on the top model in the pool): $23.90. Retained Value: $21.80 — 91% of the bill you'd have paid without routing, saved automatically. The top row of Agent Activity is Aider itself.
Why bother
The Aider community has always been the most cost-aware coding-agent community out there. It's the one tool that puts the running total in front of your face at every turn. You already tune --edit-format, pick smaller repo maps, and switch to Haiku for cheap sessions.
RR takes that instinct and automates it. Instead of you deciding "this next message is complex, better switch to Opus," RealitySignal scores every call in flight and picks accordingly. Instead of you rewriting .aider.conf.yml between projects to save a few cents, one config points at RR and you're routed forever.
- Kick off big refactors without a per-turn budget worry. RR will keep expensive models rare and reserve them for turns that actually need them.
- See where the money went, not just how much. Aider tells you $2.14 for the session; RR tells you which of your 47 turns hit Opus 5 and why.
- No caps. If you've been eyeing OpenCode Go or Claude Max as ways to escape per-token pricing, know that they come with their own caps ($60/mo hard limit, 40hr/wk soft limit). RR bills per token, no cap, no reset window.
Same Aider. Same /commit. Same repo-map. Just measured, routed, and cheap enough to leave running.
Reality Router is open source and self-hosted. Metrics in this post are from a real 384-request run.