llm-router plugin
Hooks read each prompt before the model and ask a free or local model for a draft first, saving Claude subscription quota.
- 122 ★ on the repository
- Last commit
Broad access
Why this level
- Direct execution is on by default: a local model writes files and runs commands.
- Hooks read every prompt and can send it to external providers.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add plugins/llm-routerDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- Direct execution is on by default: a local model writes files and runs commands.
- Hooks read every prompt and can send it to external providers.
This is third-party code. Review the repository files before installing.
What it does
llm-router hooks into the coding agent lifecycle. A simple heuristic classifier scores a prompt before the model sees it, and routable prompts get a draft from a free or local model first, walking up toward paid ones only if needed. API keys are optional: on a Claude Pro or Max subscription, routing runs through MCP tools and local models. The draft is an advisory hint by default and Claude still takes the turn; zero-Claude mode is a separate opt-in. A prompt containing an API key, token or private key goes only to a local Ollama model or is refused. A grounding check discards drafts that cite files or functions absent from the repository. The default MCP surface shows 12 front-door tools. `llm-router status` reports verified and unverified savings separately, each with its own sample size.
Who it is for. Claude Pro and Max subscribers who hit the five-hour limit on small questions such as "what does this error mean".
Good fit when
- The Claude limit runs out although half the prompts are JSON reformatting and error explanations.
- A local Ollama is available and simple questions should go to it.
- The same router is needed in Claude Code, Codex CLI and Cursor.
- A prompt accidentally contains an API key and must not reach the cloud.
Not a fit when
- You need a proxy for pay-per-token traffic: the project works through hooks and MCP, not as a gateway for your agent.
- A local model must not be allowed to write files and run commands.
- Every prompt must be answered by one chosen model without drafts.
Example request
What does this compile error mean? Answer through the router and leave the hard part to Claude.Limitations
The classifier scores about half of prompts with confidence (788 of 1,571 in the author measurement of 23 September 2026) and the rest take a default. Direct execution is on by default: a local model gets `write_file`, `edit_file` and `run_command` under an allowlisted path, and the static tripwire does not stop targeted deletes or `git push --force`. An OS sandbox is still planned. Savings figures are a counterfactual at API list price, not real money on a subscription.
How to disable. Turn off local-model writes and commands with `LLM_ROUTER_DIRECT_EXECUTION=false` and tool-call enforcement with `LLM_ROUTER_ENFORCE=off`. The `llm-router uninstall` command removes the project completely, including the daily job.
FAQ
Are API keys required?
No. On a Claude Pro or Max subscription, routing works through MCP and local models. Provider keys only widen the model pool.
Which hosts are supported?
Claude Code (default), Codex CLI, OpenCode, Gemini CLI, GitHub Copilot CLI, Cursor, Windsurf, VS Code, Claude Desktop and others. Add `--host` to `llm-router install` for another host, and `--host all` installs every one.
Will a draft replace the Claude answer?
Not by default: the draft arrives as an unverified hint. Zero-Claude mode is a separate opt-in.
Where does a prompt with a secret go?
Only to a local Ollama model on a loopback daemon, or it is refused with the secret category. To send it to the cloud anyway, prefix the request with `cloud:`.
How do I disable local-model writes and commands?
Set `LLM_ROUTER_DIRECT_EXECUTION=false`. Tool-call enforcement is switched off with `LLM_ROUTER_ENFORCE=off`.
Discussion
No questions or reviews yet.
Related
PluginsA local gateway for Claude Code, Codex, OpenCode and other agents: pick model providers, route requests, set fallbacks and read logs
A Claude Code plugin that asks several AI models the same question and shows their answers side by side with a synthesis of agreement and divergence
CLI that picks the agent, model and effort for a task by remaining subscription quota and launches it in a Herdr pane.
Local CLI proxy for Claude Code that translates provider API formats and selects models using configurable routing rules
The brick CLI runs a local model router in front of Claude Code or Codex and sends each request to a fitting model.
A Claude Code workspace folder: hooks with a local Ollama detect the project type, pick skills and remind you to update the docs
README in short
The project publishes self-audits and RouterArena benchmark results with a note that they are not independently verified. Per-host support is listed in `guide/HOST_SUPPORT_MATRIX.md`.