Routr
Agent work across two subscriptions and an API lane needed one place that picks the model for each task, enforces the pick, and keeps both wallets inside their limits.
- Period
- 2026-09 to present
- Status
- Built, in use
- Stack
- Python 3.13, Claude Code hooks, OpenRouter API
- Ownership
- Sole builder
Problem
Several models from several providers can do a given piece of work, at different cost and quality. Left to habit, every task goes to the most expensive model and the weekly allowance runs out midweek. The routing engine makes the pick a rule, not a habit, and makes the rule enforceable.
Role
Kavish set the routing policy (which model family for which kind of task, at which difficulty tier), wrote the specs, reviewed the code and reads the audits. Implementation was drafted by AI coding agents from his specs, under his review and tests.
Built
A dispatcher with a route table
Each task is classified by family and difficulty tier, and the dispatcher picks the provider and model from a route table, records the launch, and hands back a token the worker carries.
A gate that denies the unrouted path
Hooks in the coding agent deny any delegation, file write or shell call that did not go through the dispatcher, with a second check after each shell call for scripts written around the gate.
Wallet readings and reserves
Both subscriptions are read every few minutes. A weekly reserve, a worker-slot limit and a hard stop for the manager model keep the work inside the allowance, with a cheaper model as the backup seat. A small API lane carries mechanical work with its own cost ledger.
Result
In use since September 2026 for every delegated task. The September 2026 audit found 765 launches, every one on the correct seat; 923 tests on the code.
Collaborators
AI coding agents (Claude Code, Codex): drafted implementation from specs and plans he wrote, under his review and tests. No other contributors.
What stays private
Account identifiers, subscription figures and the audit ledgers.