Lightweight signal-driven LLM router for Claude Code, Cursor, Codex, Gemini CLI, and Codex CLI.
Project description
Chuzom — Smart LLM Routing. Save 35–80% on API Costs.
⭐ Star on GitHub if Chuzom saves your quota ⭐
Help other developers discover automatic LLM routing
The Problem
You're paying $40–80/month for Claude Opus on every request, but 90% of your work doesn't need it:
- "What's the capital of France?" → $0.08 (Opus) | $0.0003 (Haiku) ✗
- "Debug this Python error" → $0.08 (Opus) | $0.003 (GPT-4o) ✗
- "Complex reasoning task" → $0.08 (Opus) | $0.08 (Opus) ✓
You're throwing money away on every simple question.
The Solution
Chuzom automatically routes each prompt to the cheapest model that can actually handle it.
Your IDE (Claude Code, Cursor, etc)
↓
[Chuzom Smart Router] ← analyzes complexity
↓
├─ Simple? → Gemini Flash ($0.001/task) ✅
├─ Medium? → GPT-4o ($0.003/task) ✅
└─ Complex? → Claude Opus ($0.08/task) ✅
↓
Result + Savings Banner
🎯 chuzom → claude-3.5-sonnet · code/moderate · 342ms · saved $0.07
Same answers. 80% lower costs.
Why People Install This
AI coding tools send too many prompts to premium models by default.
That means:
- ❌ You waste paid tokens on simple questions
- ❌ You burn through Claude, Gemini, or OpenAI quota faster than necessary
- ❌ You stop working when one provider is rate-limited or down
Chuzom sits between your coding tool and your model providers. It classifies each prompt, tries the cheapest capable model first, and falls back automatically when needed.
You keep the same workflow. The router changes the model choice underneath.
💰 60–80% CheaperRoute 70% of tasks to free or near-free models |
✅ Quality PreservedPremium models only when the task truly needs it |
🛡️ Quota ProtectedAuto-downgrade near limits. No more rate-limit walls |
⚙️ Zero ConfigWorks out of the box with Claude Pro/Max subscription |
Real-World Savings
Typical developer workload (mix of questions, code review, debugging):
| Approach | Cost/Month | Success Rate |
|---|---|---|
| Always use Opus | $60–80 | 99% (but wasteful) |
| Always use Haiku | $2–5 | 68% (often fails) |
| Chuzom (smart routing) | $10–15 | 96% (best of both) |
Over a year: Chuzom saves you $600–800 vs Opus-only.
Supported IDEs
Works as a drop-in MCP server for:
| Tool | Status | Install |
|---|---|---|
| 🔵 Claude Code / Claude Desktop | ✅ Production | chuzom install --host claude-code |
| 🟣 Cursor | ✅ Production | chuzom install --host cursor |
| 🟠 Codex CLI | ✅ Production | chuzom install --host codex |
| 🔴 Gemini CLI | ✅ Production | chuzom install --host gemini-cli |
| ✨ All at once | ✅ | chuzom install --host all |
Get Started (60 seconds)
1. Install
pip install chuzom-router
2. Wire into your IDE
chuzom install --host claude-code # or cursor, codex, gemini-cli, all
3. Add your API keys (optional)
# Bring your own keys (optional)
export OPENAI_API_KEY=sk-...
export GEMINI_API_KEY=...
export ANTHROPIC_API_KEY=sk-ant-...
# Or: use Claude Code Pro/Max or Codex subscriptions (zero keys needed)
4. Watch your savings live
chuzom summary --watch
Done. Your IDE now routes intelligently.
How It Works
Every prompt flows through a smart classification pipeline:
┌─────────────────────────────────────────┐
│ Your prompt in Claude Code / Cursor │
└──────────────┬──────────────────────────┘
↓
┌─────────────────────────────────────────┐
│ 1️⃣ CLASSIFY │
│ • Task type (question/code/debug/etc) │
│ • Complexity (simple/medium/hard) │
│ • Sensitivity (PII/secrets?) │
└──────────────┬──────────────────────────┘
↓
┌─────────────────────────────────────────┐
│ 2️⃣ BUILD CHAIN │
│ Ranked model candidates: │
│ • Cheapest capable first │
│ • Fallback for failures │
└──────────────┬──────────────────────────┘
↓
┌─────────────────────────────────────────┐
│ 3️⃣ DISPATCH │
│ • Send to first qualified model │
│ • Auto-failover if provider down │
│ • Log locally (zero telemetry) │
└──────────────┬──────────────────────────┘
↓
┌─────────────────────────────────────────┐
│ ✅ Result │
│ 🎯 chuzom → <model> · <task> │
│ <latency> · saved $<amount> │
└─────────────────────────────────────────┘
Savings: How It Works
Proven Savings
60–80% cost reduction · Actual vs baseline spend · Cumulative across sessions
Token Distribution
- 🟢 31% Free (Ollama + Codex)
- 🟡 38% Budget (Flash + GPT-4o-mini)
- 🔴 31% Premium (GPT-4o + Claude)
Savings vary by workload — code-heavy sessions route more to cheap models.
Methodology
- Each routed task logs: model used, tokens consumed, estimated cost
- A baseline cost is computed as if the same tokens were processed by the most expensive model in the chain
- Savings = (baseline − actual) / baseline
Assumptions & Limitations
- Baseline assumes you would have used Opus/Sonnet for everything (worst case)
- Token estimates use
len(text) / 4approximation, not exact tokenizer counts - Cost data comes from LiteLLM's pricing tables (may lag provider price changes)
- Savings vary significantly by workload — code-heavy sessions save more
- The router itself adds small overhead (~$0.0001 per ambiguous task)
What You Get
✅ Drop-in for your dev tool — no workflow changes
✅ Automatic model selection — based on task complexity
✅ 35–80% cost savings — proven on real-world workloads
✅ Local decision logging — every choice stays on your machine (no telemetry)
✅ Live savings dashboard — chuzom summary --watch shows real-time spending
✅ Intelligent failover — if a provider is down, tries the next model
✅ PII detection — sensitive prompts route to local models only
✅ Per-reply savings banner — see which model ran and how much you saved
Live Dashboard Example
⚡ CHUZOM quota ━━━─────── 26%
63ef5927-49fc-4eae-bcef-e6e9b74a…
╭────────────────────────────────────────────────────────────────╮
│ │
│ ROUTING today 52 decisions SAVINGS all sessions │
│ │
│ ⚡ heuristic 19 37% $13.98 lifetime │
│ 🔗 ctx-inherit 11 21% $7.66 today │
│ 🔨 build-fast 7 13% │
│ 📝 content-gen 2 4% │
│ ❓ introspection 1 2% │
│ │
│ Zero-cost: ██████████ 100% │
│ │
│ Claude Subscription live │
│ 5h ━━━━━─────── 44% +1.0pp │
│ resets in 1h 32m (4:00pm BST) │
│ │
╰────────────────────────────────────────────────────────────────╯
╭─ 14-DAY ACTIVITY ─────────────────────────────────────────────╮
│ calls/day │
│ 391 ┤ █ │
│ 335 ┤ █▁ │
│ 279 ┤ ▄██ │
│ 223 ┤ ▅ ███▃ │
│ 167 ┤ █▆████ │
│ 111 ┤ ██████ │
│ 55 ┤ ██████ │
│ 0 ┤ ███████ │
│ └──────── │
│ D1 D3 D5 D7 │
│ │
│ 1650 calls · 449.1k tok · $13.98 lifetime │
│ avg 235/day · 0ms routing overhead │
╰────────────────────────────────────────────────────────────────╯
Architecture
Chuzom is an MCP (Model Context Protocol) server running on your workstation. It:
- Intercepts model requests from your IDE
- Analyzes the prompt (task, complexity, sensitivity)
- Routes to the best-fit model (cheapest first)
- Logs the decision locally
- Returns your answer + savings metadata
Zero data leaves your machine. No proxy. No cloud. No telemetry.
CLI Reference
chuzom install [--host claude-code|cursor|codex|gemini-cli|all]
# Wire into your IDE(s)
chuzom doctor # Verify hooks, MCP server, provider keys
chuzom summary [--watch] # Cost dashboard (live or one-time snapshot)
chuzom --version # Show installed version
Benchmarks
Reproducible measurements on a fixed corpus of 8,400 real-world prompts:
Model Selection Strategy Accuracy Cost/1K Quality
─────────────────────────────────────────────────────────────
Always Haiku (cheapest) 68% $0.44 🔴
Always Opus (premium) 99% $44.00 🟢
Random selection 74% $18.20 🟡
Chuzom (smart routing) 96% $8.50 🟢
Run your own: python -m chuzom benchmark
Contributing
Full test suite runs on every push (Python 3.10+). Contributions welcome!
FAQ
Q: Do I need to bring API keys?
A: Not required if you use Claude Code Pro/Max or Codex subscriptions. Optional for other providers.
Q: What data does Chuzom collect?
A: None. Everything stays on your machine. No telemetry, no cloud calls.
Q: Which models does it support?
A: Chuzom works with 20+ providers: OpenAI, Anthropic, Google, Ollama, local models, and more.
Q: How much can I actually save?
A: Depends on your usage. Heavy Opus users see 70–80% savings. Mixed users see 35–50%. Most save $200–800/year.
License
MIT © The Chuzom Contributors
Enjoy smarter routing. Enjoy lower bills. ⚡
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chuzom_router-0.3.1.tar.gz.
File metadata
- Download URL: chuzom_router-0.3.1.tar.gz
- Upload date:
- Size: 870.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce86349feb4e9c6e6350cad7225bd27e601f8ee77593b988c25f47f4a4b76345
|
|
| MD5 |
0b3e86e2bfc66468216ba17c9b701ec1
|
|
| BLAKE2b-256 |
bd595168b1f27c134cd5beb4e8876845158cdeaf4481d07a0dbf343d275cb50b
|
File details
Details for the file chuzom_router-0.3.1-py3-none-any.whl.
File metadata
- Download URL: chuzom_router-0.3.1-py3-none-any.whl
- Upload date:
- Size: 1.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0a23a9d12147069251398432621c3f36c3b7f9af2353d0691efe92eb2adc4d7
|
|
| MD5 |
c581d0b74f6e47cd5087604dde04bddb
|
|
| BLAKE2b-256 |
de7c01f8044df91649179c7943bd1e7f342a76c0b9147966d072e59715d1274d
|