
CheapRouter
BYOK router that sends each LLM call to the cheapest capable provider across 8 providers — cache-aware, health-aware, with failover, streaming, and spend analytics.
llm
routing
cost-optimization
+7
|cheaprouter routes every LLM completion to the cheapest model that clears the task's capability tier, across 8 providers — Anthropic, OpenAI, Google Gemini, Groq, Mistral, DeepSeek, Alibaba Qwen, and xAI Grok.
BYOK — bring your own keys. You pass your provider API keys per request; the server stores no keys and no message content. The routing intelligence is the value.
What it does beyond "cheapest":
- Prompt-caching-aware costing — accounts for cache-read rates, so a cache-heavy request routes to the truly cheapest provider (not the cheapest headline price).
- Accurate token counting (tiktoken) — the cost ranking rests on real token volume, not a char/4 guess.
- Provider health tracking + automatic failover — a failing provider is deprioritised, and transient errors retry the next-cheapest automatically.
- Streaming — optional token streaming for lower time-to-first-token.
- Spend analytics + budgets — durable per-session spend tracking and budget alerts.
- Staleness-guarded prices — prices are versioned and dated; the router refuses to route on stale prices rather than misprice.
Free. Open source (MIT). No vendor lock-in.