Skip to content

Pi TypeSafe Router

A Pi coding-agent extension that uses Jev to classify each request and route it to one of three configured models. Supports TypeSafe, Cloudflare AI Gateway, Vercel AI Gateway and OpenRouter backends, with doctor checks, shadow mode and an off-by-default setup.

Stars
0
Language
TypeScript
License
MIT
Published by
Community
Last verified
Oct 2026

About this project

Use Jev to classify requests and route them to the right model for the task. Do not enable this alongside another automatic router. Choose a real provider/model in Pi first, then run: This creates /.pi/agent/typesafe-router.json, initially off, using your selected model for all three routes. Edit the mappings, set TYPESAFEAPIKEY in the environment that launches Pi, and run /reload. Verify your configuration, then enable routing:

Quoted from the project's README. Read the full README.

Highlights

  • Configures via /typesafe-router setup with TypeSafe, Cloudflare, Vercel and OpenRouter example configs; starts off until enabled.
  • Routes through jev-1.13.0 on TypeSafe by default; doctor tests the classifier and configured models with synthetic requests.
  • Footer shows router on, shadow or off state plus the last classified route and target; offline tests make no paid API calls.
  • MIT licensed and published on npm as pi-typesafe-router; asks users not to enable it alongside another automatic router.

Watch out

Requires a TypeSafe or gateway API key to classify and route. The README warns against running it alongside another automatic router.

Questions about this entry

Short answers drawn from the linked project or page.

Reactions & coverage

Posts, threads, and videos about this entry from around the web.

Facebook: Intake Router keeps diagnosis out of the answer space at the front desk.

FacebookClinicnotes

YouTube: Jev explained for routing and judging, with a comparison against LLMs.

Hacker News: Vercel on using Jev for defined decisions and GPT-6 Astra when the job also has to write or use tools.

flashbrew4 pointsTypeSafe AI Jev vs. GPT-6 AstraRead the thread on Hacker News

Hacker News: ASTGL replay chose local Laya routing over hosted Jev on one Mac Studio setup.

Jmeg8r15 pointsDoes an open-weight decision model beat a hosted one? Jev vs. LayaRead the thread on Hacker News

Related terms

Glossary definitions related to this entry.

More Jev resources like this

21GitHub stars
MIT-licensed Python tool router for coding agents that keeps obvious calls on a fast path, asks Jev (default typesafe/jev-1.13 via OpenRouter) for genuinely ambiguous choices, and can run bounded MCTS when multi-step consequences matter. Ships a CLI, MCP server and hook integrations.
Jev Tools & CLIs#community#routing#mcp
Merged PR in the Kilo Code cloud monorepo that replaces its LLM auto-routing classifier with one OpenRouter /systemone Choice request to typesafe/jev-1.13; the PR reports 0.93-0.94 route accuracy on 72 golden cases at roughly $0.00028 per call, with a 250 ms transport-error retry.
Jev Integrations & Adapters#community#routing#coding-agents
0GitHub stars
A CLI, Claude Code plugin and Pi extension that pick a model per task from one Jev call: a Choice over candidates asked in both orders plus a complexity Score that sets a minimum tier, with quota-aware filtering and fallback.
Jev Tools & CLIs#community#routing#claude-code
9.2kGitHub stars
An open-source AI office suite whose local file search reranks the top 20 FTS hits with TypeSafe Jev relevance scores before showing results.
Jev Tools & CLIs#community#typescript#desktop
3.4kGitHub stars
Vercel Labs' Unix-like coding agent CLI written in Zig, shipping a typesafe_permission_reviewer builtin that runs the agent's permission decisions through Jev rather than an LLM call. Model-agnostic and embeddable via libfx and ACP.
Jev Tools & CLIs#community#coding-agents#cli
140GitHub stars
A local Chrome extension plus CLI that classifies each agent PR hunk as P0, P1, or P2 with Jev, showing P0 by default and human-readable diff summaries.
Jev Tools & CLIs#community#code-review#typescript

From the Jev guides

Original write-ups on what this entry is for.

The request shape barely changes across surfaces; the surrounding contract does. When to call the API directly and when a gateway, a Worker binding, or a router entry earns its extra hop.
Jev Tools & CLIs#gateway#vercel#cloudflare
Read article
Taking a decision checkpoint out of Python: what the GGUF and browser WebGPU exports preserve, what they change, and the parity evidence the model cards publish.
Jev Tools & CLIs#open-models#local#onnx
Read article
Jev labels a record that already exists. Code moves, flags, or holds it. How the document, mail, and transfer tools keep the action out of the model.
Jev Tools & CLIs#classification#email#security
Read article
Back to all resources

From the Jev community

Posts from builders shipping with Jev right now.

Follow @typesafeai