What is model-router?
model-router is a Claude Code mod by preisnerai that cache-aware model and effort routing for Claude Code Desktop: each prompt goes to Haiku, Sonnet or Opus by what it needs, and a cheaper model or effort only when that pays after the. It is listed under Cost & usage and has no public popularity data yet.
| Type | Claude code mod |
|---|---|
| Author | preisnerai |
| Repository | preisnerai/claude-mods |
| Popularity | no public popularity data yet |
| Category | Cost & usage |
| Security | High risk (32/100) |
| Rank | #7,940 of 9,397 Claude Code mods; #1,546 in Cost & usage |
| License | MIT |
| Last commit | 2026-11-13 |
| Hooks | 15 events |
| Sees | classic hooks, compaction, every prompt, every tool call, subagent spawns |
| Draws on | Pane, UserMessage, SessionMode |
Is model-router safe to install?
model-router scores 32/100 on the MCPMods security check: High risk. Things to review: sends data over the network; starts processes outside the sandbox; writes files or config; reads environment variables; watches every prompt or event. It passed 1 of 8 checks.
Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.
| Check | Result |
|---|---|
| Sends data over the network | Review |
| Starts processes outside the sandbox | Review |
| Writes files or config | Review |
| Reads environment variables | Review |
| Watches every prompt or event | Review |
| Drives Claude (model calls, prompts) | Note |
| Validator reported problems | Note |
| Has an open-source license | Pass |
API calls in its code
| Call | What it means |
|---|---|
$.agent.list | |
$.agent.register | |
$.clock.now | |
$.clock.sleep | |
$.command.list | |
$.command.register | |
$.env.get | reads env vars |
$.fs.exists | reads files |
$.fs.read | reads files |
$.fs.write | writes files |
$.http.fetch | network requests |
$.model.complete | drives Claude |
$.process.run | runs processes |
$.session.compact | drives Claude |
$.session.cwd | |
$.session.id | |
$.session.messages | reads the transcript |
$.session.model | |
$.session.usage | |
$.state.get | |
$.state.set | |
$.store.delete | keeps its own state |
$.store.get | keeps its own state |
$.store.set | keeps its own state |
$.ui.open | draws interface |
$.ui.resolve | draws interface |
$.ui.status | draws interface |
How do I install model-router?
- Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
claude --version
- Read its footprint. This lists every event it hooks and every API call it makes, without running it.
git clone https://github.com/preisnerai/claude-mods claude plugin validate ./claude-mods/model-router
- Install it. Run this in your terminal, then /reload-plugins in an open session.
claude plugin marketplace add preisnerai/claude-mods && claude plugin install model-router@claude-mods
Or ask Claude to set it up
Paste this into Claude Code and it installs model-router for you:
Install the "model-router" Claude Code mod from https://github.com/preisnerai/claude-mods/tree/main/model-router. Run claude plugin validate on it first and show me what it can access before you enable it.
More from preisnerai/claude-mods
This repository has 2 Claude Code mods on MCPMods.
- find-mod: Wyszukiwarka modów do Claude Code na GitHubie: z opisu albo z kontekstu sesji, wybiera pasujący mod z największą liczbą (Review before installing)