Skip to content
プロジェクト

概要

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.

開発ツール

この数値の測り方

計測したスター増加

24時間
+1
7日間
+2
15日間
+7
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

Claude Model Router

CI License: MIT

For Claude Code users with mixed work: each turn gets a fitting model and effort, picked automatically and shown above your prompt.

The desktop Router band with a label under each part: the tier meter; model and effort, Opus 5.5 xhigh; activity, code; reason, clearly stronger; routing mode, balanced; the context and cache readings; and the Pin to a tier and Router controls.
flowchart LR
  A["1 · Prompt<br/>“why does this test fail?”<br/>your classifier rates tier and activity"]
  B["2 · Route<br/>Opus 5.5 · xhigh<br/>local rules weigh cache, context, holds, policy"]
  C["3 · Turn<br/>Claude Code runs it<br/>the band shows the route and why"]
  A --> B --> C

Illustrative example. No proxy; prompt text goes to the classifier you choose.

Quick start

You need a Claude Code version at or above MIN_CLAUDE_CODE in lib/config.mjs (on an older one the router names that minimum and keeps Claude's model), and credentials for one classifier or a local Ollama model.

claude plugin marketplace add alexei-led/claude-router
claude plugin install router@alexei-led-claude-router
claude --model claude-haiku-5-5

In Claude Code, run /plugin configure router and save the credentials. Jev is the default classifier; to use another, select it on the Classifier tab of the /router pane. Before the first turn, the band above the prompt shows a dim tier meter, the model, ready and the routing mode, such as balanced. Send a prompt. /router off stops routing. Desktop app and VS Code set-up.

See where your turns went

The Now tab of the pane: the next turn route with a pin button per tier, plan usage bars, context and cache, and this session's cost against no routing with a strip of replies by tier.

Now: the next turn's route and why, plan usage, context, this session. Sample data.

The top of the Usage tab: period buttons with 7 days selected, and a summary of estimated cost against no routing for the main conversation and the subagents.

Usage: estimated cost against no routing for the same tokens. Sample data, not a measured saving.

Anthropic defaults: Haiku 5.5 for the micro and low tiers, Opus 5.5 for medium and high; some kinds of work use Sonnet 5.5 or Haiku instead. All routes.

Savings and answer quality are not measured; costs shown are list-price estimates. Evaluation.

Control it

To Do
Open the pane /router, or Router on the band
Turn routing on or off /router on, /router off
Pin the next turn to a tier /router pin <micro|low|medium|high>, or the pin control
Lean cheaper or stronger /router mode cost|balanced|quality
Move one turn from the prompt Start it with morethink, highthink, maxthink, lessthink, lowthink or nothink
See why each turn ran where it did /router decisions

Classifiers and privacy

Classifier Credential Prompt text goes to
Jev, the default (typesafe.ai) Jev API key typesafe.ai
Clef, Clef Flash, Clef Omni Cloudflare API token and account ID Cloudflare
OpenAI, gpt-6-luna OpenAI API key OpenAI
Valar Joey, Valar Elephant Valar API key with Decisions access api.valarhq.ai
Ollama None by default This machine by default

Only the active classifier receives text. See what Router sends and when. The table lists default destinations; a trusted profile can override them.

Go further

Several providers in one session: use claude-proxy, one local Anthropic API endpoint for Claude Code and multiple native model providers. With it and the model-proxy profile, one session can route turns across providers and mix your Claude subscription with API-key providers such as DeepSeek. It is a separate, optional program; the router itself does not proxy traffic. Mix providers.

関連プロジェクトを探す

読み込み中…