Claude Code model router
Frugal
Cost-optimised agent router for Claude Code: sends every sub-task to the cheapest model that can do it, and escalates only on verified failure.
Install
/plugin marketplace add ThomasLangbroek/frugalFound in the project README. Check it for setup steps after installing.
git clone https://github.com/ThomasLangbroek/frugal.gitFrom the README
frugal A cost-optimised agent router for Claude Code. Frugal teaches the main loop to send every sub-task to the cheapest execution strategy that can succeed, and to escalate only on verified failure: The expensive reasoning model plans and judges; commodity work (locating files, extracting data, mechanical edits) runs on cheap tiers. No framework, no runtime, no API keys: frugal is a plugin made of a routing skill, five agent definitions, and two small hooks. The harness does the rest. Install How it works The main model already reads every request, so it acts as the router at zero marginal cost. The routing skill gives it one decision table: Plus a tool-first rule: if grep, jq, git, terraform or any deterministic command solves the task, no model is called at all. Escalation (verification first) Workers do not self-grade their way up the ladder. Every worker ends with a fixed footer: The router then applies four rules: 1. If a deterministic check exists (tests, compiler, schema validation, terraform validate), run it. Pass = done. Fail = escalate one tier, maximum one retry, then the main loop takes over. 2. No check available: the main model spot-reads the result. It receives it anyway, so judging it costs almost nothing. 3. The worker's ESCALATE: yes is advisory input, never the sole trigger. Self-reported confidence from a cheap model is poorly calibrated; observable failure is not. 4. Never start at an expensive tier unless the decision table requires it. sage (Fable) is reached only via high-risk table rows or after escalation exhausts, one attempt, final. Metrics and the cost report A SubagentStop hook logs one jsonl line per worker run (agent, model, token usage, escalation flag) to ~/.claude/frugal/metrics.jsonl. Run: to get cost per tier,…
Details
- Repository
- ThomasLangbroek/frugal
- Website
- thomaslangbroek.github.io/frugal
- Language
- Python
- License
- MIT
- Last updated
- 1 November 2026
- Topics
- ai-agentsanthropicautomationclaudeclaude-codecost-optimizationdeveloper-toolsllmplugin
FAQ
What is Frugal?
Cost-optimised agent router for Claude Code: sends every sub-task to the cheapest model that can do it, and escalates only on verified failure. It is a model router for Claude Code, from ThomasLangbroek/frugal on GitHub.
How do I install Frugal?
Run /plugin marketplace add ThomasLangbroek/frugal inside Claude Code, then follow the setup in the README.
Is Frugal popular?
ThomasLangbroek/frugal has 38 GitHub stars and 5 forks. It was last updated on 1 November 2026.
More model routers & proxies
Luthien Proxy
34LuthienResearch/luthien-proxy
AI Control for Claude Code in the real world
CC Router Ping
37evepupil/CC-router-ping
测试claude code公益站使用连通性
Commandcode API Proxy
36thaolaptrinh/commandcode-api-proxy
Bring your CommandCode Go subscription to OpenCode, Claude Code, and more.
Claude Code Aws Gateway
22antkawam/claude-code-aws-gateway
Self-hosted API gateway for Claude Code on Amazon Bedrock — unlock extended thinking, web search & tool use with team budgets, OIDC SSO, and an admin portal
Claude Zeroclaw Nexus
52omaralisql/Claude-Zeroclaw-Nexus
Claude Code ZeroClaw Pro 2026: AI Multitool & CLI Router for Claude SDK Subagents
Claude Router
38alexei-led/claude-router
Claude Code plugin that picks the model and effort for each turn (micro, low, medium, or high tier), advised by Jev, Clef, OpenAI, or a local Ollama classifier.
Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.