Claude Code model router
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.
Install
claude plugin marketplace add alexei-led/claude-routerFound in the project README. Check it for setup steps after installing.
git clone https://github.com/alexei-led/claude-router.gitFrom the README
Claude Model Router
A Claude Code Mod that chooses a model and effort for each main-conversation turn, advised by a prompt classifier: Jev; Cloudflare's Clef, Clef Flash or Clef Omni; OpenAI; or a local Ollama model.
The Mod changes only the model and effort in Claude Code's turn hook. Claude Code sends the request, streams the reply, runs tools, and reports usage. The router does not proxy model traffic or start a local server; an Ollama classifier calls an Ollama server that you run. Subagents get one model each when they start, chosen the same way: every agent whose definition names no model, says model: inherit, or sets modelRouting: auto. Their steps are never re-routed. See Subagent routing.
Providers
Use the provider that already works with Claude Code. Select its router profile, not a new endpoint:
Create ~/.claude/deepseek-router.json containing {} to use DeepSeek defaults.
With CLAUDE_CONFIG_DIR, put the file in that directory instead.
OpenRouter, Ollama, other local servers and other compatible hosted providers use custom -router.json files.
They have no built-in model defaults. A selected file must exist and validate, or the router leaves Claude Code's model unchanged.
See Providers for default routes and activities, custom profiles, and the --settings flag alternative.
Execution provider selection is separate from classifier selection. Observed usage stays visible even when a provider's cache behavior makes savings comparisons unavailable.
Supported classifiers
The active classifier is asked at the start of each logical turn, for the tier and for the turn's activity, and again in the background every 4 requests while the turn runs (policy.reviewEveryRequests). Pick one on the pane's Classifier tab or in the selected router file; only the active…Details
- Repository
- alexei-led/claude-router
- Language
- JavaScript
- License
- MIT
- Last updated
- 3 November 2026
- Topics
- anthropicclaudeclaude-codeclefcloudflarejevllmmodel-routingollamaopenaipluginprompt-classifier
FAQ
What is 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. It is a model router for Claude Code, from alexei-led/claude-router on GitHub.
How do I install Claude Router?
Run claude plugin marketplace add alexei-led/claude-router, then follow the setup in the README.
Is Claude Router popular?
alexei-led/claude-router has 38 GitHub stars and 4 forks. It was last updated on 3 November 2026.
More model routers & proxies
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
Pentect
35EdamAme-x/pentect
Local security proxy that keeps secrets and sensitive data out of AI requests. Supports Codex, Claude Code and more.
CC Router Ping
37evepupil/CC-router-ping
测试claude code公益站使用连通性
Codebuddy2api
33orangeboyChen/codebuddy2api
Proxy CodeBuddy with OpenAI-compatible and Anthropic-compatible APIs for Codex, Claude Code, and standard SDK clients.
Frugal
38ThomasLangbroek/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.
Claudex
36migueltorrezd/claudex
Run Claude Code with GPT models through Raine's claude-code-proxy.
Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.