mixture-of-models-claude-mod
English · 简体中文 · 日本語 · Deutsch · Français · العربية

Setting this up with a coding agent? Point it at INSTALL.md: "Follow INSTALL.md in alinaqi/mixture-of-models-claude-mod to set up Mixture of Models for me." It has every command, a check for each step, and what to ask you. Works for Claude Code, Codex, Cursor, OpenCode, Antigravity, GitHub Copilot CLI, Aider, Continue and Goose.
Installed? GUIDELINES.md has the best practices for each agent: let the system pick the models, how to word prompts so routing and memory work, what to delegate, and what to do when a route looks wrong.
Keep your Claude subscription for the turns that need it. Hand the rest to a cheaper model. A Claude Code mod (an in-process plugin, new in Claude Code 2.1.287) that scores every prompt for blast radius and answers the low-score turns with a separate headless Claude Code on an Anthropic-compatible gateway (GLM, Kimi, DeepSeek, whatever yours serves). Your main session is never renamed, re-pointed or touched. Ported from Maggy's routing.
Routes can also name a model family: claude/sonnet runs that Claude member on your own Claude login, kimi/auto lets the score pick a Kimi member, and codex hands the turn to the Codex CLI (codex exec) on Palgu or on your ChatGPT login. See Families and Codex.
Get Palgu's models in one command
No dashboard, no copying keys. After installing the mod, in Claude Code:
/palgu login
- The mod shows a sign-in link and a short code, for example
WDJB-MJHT.
- Open the link, sign in to Palgu or sign up (new accounts start on the free plan), check the code matches and press Allow. The page names the app: Allow Mixture of Models on "Claude Code on your-mac"?
- Back in the terminal a toast says Signed in to Palgu as [email protected]. That's it: simple and coding turns now run on Palgu's models (GLM 5.3, Kimi K3.1, DeepSeek V4 Pro, Gemini 3.8 Flash, MiniMax M3, GPT-6), and critical turns stay on Claude. No restart.
| Command | What it does |
|---|
/palgu login | Sign up or sign in, and connect this computer |
/palgu status | Who is signed in, the organisation and its plan, and what it spent of its Palgu budget this period |
/palgu upgrade | Plans and billing (paid plans are bought on the web; your key picks up the new plan by itself) |
/palgu continue [--open] | Continue this session in Palgu with its full context: copies cd <folder> && palgu --continue-claude=<session id>; --open starts it in a new macOS Terminal tab. Palgu reads the transcript itself and redacts credentials |
How it works: Palgu's device sign-in (the same one srooterctl uses) mints an API key for this computer only. You can see and revoke it on Palgu's Devices page. The mod saves it in Claude Code's secure storage with claude plugin configure --values-stdin, so it never appears on a command line or in a settings file. Already have a key, or use another gateway? See Setup.
To be precise about what it is: turn-level delegation, not per-request model mixing. A routed turn runs in a child process with a short brief of your recent context; the child's answer lands in your transcript, tagged. Critical turns stay on Claude exactly as before.
Install
Mods need Claude Code 2.1.287 or later. The stable Homebrew cask is still 2.1.286, so check first:
claude --version
# too old? one of:
brew uninstall --cask claude-code && brew install --cask claude-code@latest # Homebrew
npm install -g @anthropic-ai/claude-code@<version> # npm: a version from 2.1.287 on
claude update # native installer
Then:
claude plugin marketplace add alinaqi/mixture-of-models-claude-mod
claude plugin install mixture-of-models@mixture-of-models-claude-mod
or, inside a session, /plugin install mixture-of-models --marketplace alinaqi/mixture-of-models-claude-mod.