Skip to content

pi-model-router

Pi extension for four-tier model routing with an optional classifier advisor (formerly Jev/Clef-specific, now any Pi classifier).

Pluginbeta

Overview

pi-model-router lets one Pi profile select different models and reasoning efforts as a task changes, including between tool-loop requests. You choose the models, effort levels, fallback order and baseline and can pin a route at any time. Optional activity routes (code, debug, explore, plan, review, ops, docs) share one consent-gated classifier operation, and periodic background reviews can change tier, activity and effort between requests with switch-cost controls. A Signal Panel and /router view show decisions and usage.

Optional routing advice comes from any text-capable classifier registered in Pi via its typed classifier API, with explicit per-profile approval of the exact provider/model. The README's migration note says version 0.11.0 had Jev, Clef and chat-classifier settings that are now replaced by generic advisor settings, so Jev can still serve as the advisor through Pi's classifier models but is no longer special-cased. Advisors add latency and separate fees.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich tier, activity and effort fit the current work?(inferred)—

How it works

  1. Define a profile with tiers, efforts and fallbacks.
  2. Optionally approve a classifier advisor (e.g. Jev via Pi).
  3. Advisor reads bounded context and recommends a route.
  4. Router switches model and effort between requests within cost controls.

Strengths

  • Fine-grained, user-controlled routing.
  • Advisor-agnostic with explicit approval.
  • Visible decisions in a panel.

Caveats

  • Jev is no longer specifically integrated since the generic advisor change.
  • Advisors add latency and cost.

Getting started

Install @alexeiled/pi-model-router into Pi and follow the user guide to configure profiles and an advisor.

At a glance

Type
Plugin
Status
beta
Language
TypeScript
Runtime
Pi extension
Has code
yes
Has tests
yes

Use cases and integrations

How curated lists describe it

Frequently asked questions

Does it use Jev?

It can, as any classifier registered in Pi; Jev-specific settings were replaced by generic advisor settings.

Can routes change mid tool loop?

Yes, background reviews can change tier and effort between requests.

Do I need an advisor?

No, advice is optional.

Related projects

  • TypeScript/Bun launcher that asks Jev which model and reasoning effort each Codex, Claude Code or Pi turn should use.

    ProjectbetaTypeScript
  • CLI, Claude Code plugin and Pi virtual model that pick the right model per prompt from one Jev call with a complexity floor.

    PluginbetaTypeScript
  • Oh My Pi extension where Jev classifies each prompt as simple or advanced and switches the model role, defaulting to advanced on doubt.

    PluginbetaTypeScript
  • Pi extension routing plan and implementation phases to light, standard or heavy model tiers based on a Jev capability score.

    ProjectbetaTypeScript
  • Pi extension asking Jev four questions per prompt (task kind, complexity, capability, deep reasoning) to pick a budget-aware model tier.

    ProjectbetaTypeScript
  • Pi model router using Jev via Vercel AI Gateway to pick a model and reasoning effort once per session, then stay pinned.

    ServicebetaTypeScript