pi-jev (iefnaf)
Pi extension suite using Jev for selective verbatim compaction and per-turn routing between cheap and strong models.
Overview
pi-jev (iefnaf, published as @alexlikevibe/pi-jev) is a Pi extension suite powered by Jev's typed judgments. Compaction, hooked into session_before_compact, removes obsolete tool calls, shortens unneeded results and retains remaining text verbatim instead of generating a summary. Routing, hooked into before_agent_start, sends easy requests to a cheaper model and hard requests to a stronger one, switching before each turn.
Both features are optional and independently enabled; if Jev is unavailable, Pi continues with normal compaction or the current model. A /jev settings menu configures providers, compaction and routing targets (routing stays inactive until a cheap or strong target is set). It works with a TypeSafe or OpenRouter key, auto-detecting the provider, and reads configuration changes on the next hook without restart. Documentation is in English and Chinese, with CI tests.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Does this tool output still matter? | yes · no |
| Choice | How demanding is this request (cheap or strong model)? | cheap · strong |
How it works
- Set a TypeSafe or OpenRouter key.
- Configure routing targets in /jev.
- Before each turn, route to cheap or strong.
- On compaction, keep needed tool outputs verbatim.
Strengths
- Two features in one package, each optional.
- Falls back to Pi defaults if Jev is down.
- Works with TypeSafe or OpenRouter.
Caveats
- Routing inactive until targets are configured.
- Requires credentials for routed models.
Getting started
pi install npm:@alexlikevibe/pi-jev, export TYPESAFE_API_KEY (or OPENROUTER_API_KEY), then /jev to configure.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
Pi extension suite powered by Jev: selective context compaction and model routing.
hellogumbo/awesome-jev
Frequently asked questions
What happens if Jev is unavailable?
Pi uses its normal compaction and current model.
Which providers work?
TypeSafe or OpenRouter; TypeSafe wins if both keys are set.
Is routing on by default?
It stays inactive until you set at least one target.
Related projects
Open-source AI gateway for 100+ LLMs that can use Jev to classify requests for complexity routing and to compact tool results.
ProxyproductionPythonClaude Code mod that picks reasoning effort per prompt with a Haiku judge, optionally Jev, and shows cache and context state.
ProjectbetaTypeScriptHermes Agent plugin that picks the model each turn with a direct TypeSafe Jev Choice and enforces trim-then-compress context handling.
PluginbetaPythonClaude Code plugin that picks model tier and effort per turn with Jev and weighs each switch against cost, with Jev-based compaction.
ProjectbetaTypeScriptClaude Code and Codex plugin where Jev judges each turn for model routing, delegation, evidence search and compaction.
ProjectbetaTypeScriptClaude Code mod using Jev to pick model and effort per turn, size subagents, and prune stale context verbatim instead of summarising.
ProjectbetaTypeScript