Introducing PromptBus: Smarter AI Routing for Claude Code
By PromptBus Team
After months of watching Claude Code bills pile up for trivial queries — "what does this function do?", "add a comment here", "explain this error" — we decided to build a solution.
The Problem
Claude Code is incredible. But by default, it sends every single request to the most capable (and most expensive) model — `claude-sonnet-5` — regardless of whether the task actually requires that level of intelligence.
A typical developer might send 100+ queries per day. If even half of those are simple read-and-explain tasks, that's a lot of money spent on compute you don't need.
The Solution: PromptBus
PromptBus is a local reverse proxy that sits between Claude Code and the Anthropic API. It intercepts each request, classifies the task difficulty, and routes to the cheapest capable model.
Simple queries (read_explain, small_edit) → routed to `claude-haiku-4-5` at ~⅓ the cost
Complex work (debugging, planning, refactoring) → stays on `claude-sonnet-5` with no downgrade
Unknown or uncertain → passes through unchanged (safety first)
Design Philosophy
From the start, we had a few non-negotiable principles:
1. **Zero latency overhead** — The classifier uses keyword heuristics, not an extra LLM call. It completes in microseconds.
2. **No cloud, no telemetry** — Everything runs locally. Your data never touches our servers.
3. **Transparent pass-through** — Auth headers flow through untouched. Your existing Anthropic subscription works without change.
4. **Safety-first** — If the classifier is uncertain (below 60% confidence), the request is never downgraded. If the classifier crashes, the request passes through unmodified.
5. **User-configurable** — Every routing decision is governed by a YAML config file you can edit at any time, either manually or through the dashboard UI.
What's Next
PromptBus v0.1.0 is just the beginning. We're planning:
- More sophisticated signal extraction for even better classification - Per-project routing policies - Usage alerts and budget tracking - Support for additional API providers
We'd love your feedback. Try it out and let us know what you think.