Mixture of models for Claude Code.
Keep your Claude subscription for the work that needs it. The mod keeps critical turns in your main Claude session and sends the other turns to cheaper models through palgu>, where your team's routing, budgets, policy and audit apply.
- Keep security, architecture and production work on Claude, exactly as before.
- Spend less of your Claude usage on routine turns such as docs, tests and small edits.
- Put the routed turns under your team's Palgu policy, budgets and audit.
How it decides
Every turn is scored before it runs. Your main session is never re-pointed, and a line under every answer names the model and the score.
Each prompt gets a 1 to 10 blast radius (how much damage a wrong answer does) and a task kind. A local Ollama model scores for free; otherwise Claude Haiku on your plan.
Critical turns (8 and above by default) stay in your main session on Claude. The other turns run in a separate headless Claude Code that points at Palgu: glm-5.3 by default, kimi-k3 for research and review.
If the routed turn fails, or its answer is a hand-back, an unverified claim or a request for you to act, the main session answers that turn. Follow-ups such as "continue" always return to the main session.
Set it up with palgu>
Mods need Claude Code 2.1.287 or later. Install the mod, then give it Palgu as its gateway.
claude plugin marketplace add alinaqi/mixture-of-models-claude-mod
claude plugin install mixture-of-models@mixture-of-models-claude-mod
# Reuse the key that srooterctl login saved:
source ~/.srooter/config
printf '{"gateway_url":"%s","gateway_key":"%s"}' "https://api.palgu.ai/anthropic" "$SROOTER_API_KEY" \
| claude plugin configure mixture-of-models@mixture-of-models-claude-mod --values-stdin
Or run /plugin configure mixture-of-models@mixture-of-models-claude-mod in Claude Code and enter https://api.palgu.ai/anthropic and an srt_ key from the dashboard. Then start claude and run /route. The docs have every step.
Mixture of models, or everything through palgu>?
Pick one. With the mod, your main session must not point at a gateway: if you ran srooterctl enable claude, run srooterctl claude-env off first.
| Setup | Mixture of models | Everything through Palgu |
|---|---|---|
| Main session | Your Claude subscription | Palgu |
| Turns through Palgu | Only the turns the mod routes | Every request |
| Policy, budgets and audit | On the routed turns | On all Claude Code traffic |
| Set up with | The mod plus a Palgu key | srooterctl enable claude |
More open source from the palgu> team
Maggy is our open-source engineering harness for one developer: multi-model routing, TDD gates, memory and a plugin system for Claude Code, Codex, Kimi and Gemini CLI.