Skip to content

pi-jev-router

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

ServicebetaMIT

Overview

Jev Router (mejiasd3v) lets TypeSafe's Jev, accessed through Vercel AI Gateway, choose a model and reasoning effort for Pi. The choice is made once and pinned for the session; effort also stays fixed unless adaptive effort is enabled for Codex Astra. Generation uses your existing Pi providers and credentials.

You configure options in global settings, each a model with a description (a string or a structured rubric with role, use_when, not_for and boundary) and a thinking setting; only listed, authenticated models are eligible, with a listed fallback and a five-second timeout. With thinking set to auto, Jev chooses the lowest effort it judges sufficient. The README suggests Luna for known-approach execution, Sol for bounded investigation within an established architecture, and Astra for architecture and difficult debugging. A /jev command shows the pin, effort and fork suggestions. It requires Pi 0.85.1+, Node 22.19+ and a Vercel AI Gateway key, and is MIT licensed.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich configured model fits this session's task?—
ChoiceWhat is the lowest sufficient reasoning effort?—

How it works

  1. Select /model auto/jev.
  2. Start with the actual task; Jev picks model and effort.
  3. Pin them for the session.
  4. Use /jev to inspect the pin and fork suggestions.

Strengths

  • Stable model per session preserves caching.
  • Structured rubrics for model descriptions.
  • Uses existing provider credentials.

Caveats

  • Requires a Vercel AI Gateway key.
  • Choice is made once; tasks that change scope may need a fork.

Getting started

pi install npm:pi-jev-router, /login vercel-ai-gateway, /reload, then /model auto/jev.

At a glance

Type
Service
Status
beta
Language
TypeScript
Runtime
Pi extension
Has code
yes
License
MIT

Use cases and integrations

How curated lists describe it

  • Coding agents: adds automatic per-request model routing to the Pi coding agent through Jev decisions on Vercel AI Gateway.

    yibie/awesome-jev
  • Automatic model router for Pi coding assistant: integrates Jev via Vercel AI Gateway to dispatch tasks efficiently.

    logicrw/awesome-jev-projects
  • Automatic model routing for Pi using TypeSafe's Jev through Vercel AI Gateway.

    hellogumbo/awesome-jev

Frequently asked questions

How often does it route?

Once per session; the choice stays pinned.

How is Jev accessed?

Through Vercel AI Gateway.

Can project settings change routing?

No, routing is configured in global settings only.

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 router that classifies each task with Jev via OpenRouter and picks a model from the quality-cost-latency Pareto frontier.

    ProjectbetaTypeScript