Skip to content

pi-jev (iefnaf)

Pi extension suite using Jev for selective verbatim compaction and per-turn routing between cheap and strong models.

Pluginbeta

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

TypeQuestionAnswers
Yes / noDoes this tool output still matter?yes · no
ChoiceHow demanding is this request (cheap or strong model)?cheap · strong

How it works

  1. Set a TypeSafe or OpenRouter key.
  2. Configure routing targets in /jev.
  3. Before each turn, route to cheap or strong.
  4. 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

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.

    ProxyproductionPython
  • Claude Code mod that picks reasoning effort per prompt with a Haiku judge, optionally Jev, and shows cache and context state.

    ProjectbetaTypeScript
  • Hermes Agent plugin that picks the model each turn with a direct TypeSafe Jev Choice and enforces trim-then-compress context handling.

    PluginbetaPython
  • Claude Code plugin that picks model tier and effort per turn with Jev and weighs each switch against cost, with Jev-based compaction.

    ProjectbetaTypeScript
  • Claude Code and Codex plugin where Jev judges each turn for model routing, delegation, evidence search and compaction.

    ProjectbetaTypeScript
  • Claude Code mod using Jev to pick model and effort per turn, size subagents, and prune stale context verbatim instead of summarising.

    ProjectbetaTypeScript