Skip to content

pi-jev-thinking-router

Pi/omp extension that keeps the model fixed and has Jev choose only the thinking effort each turn via a local SPI daemon.

LibrarybetaApache-2.0

Overview

pi-jev-thinking-router provides adaptive thinking-effort routing for the Pi coding agent and omp. Unlike model routers that switch models and discard the prompt cache, it keeps the model stable and only adjusts reasoning effort from minimal to high or max; turning thinking off is excluded to preserve cache continuity.

Before each turn the extension queries a local core daemon (POST /decide on 127.0.0.1:8790) that speaks an SPI v1 decision protocol powered by Jev. The stdlib-only Python daemon is spawned and managed automatically, like a language server. Any network, daemon or timeout failure keeps the current thinking level. A status bar shows the chosen level and latency, and slash commands toggle routing, show daemon health and break down the last decision. The repository also includes a Hermes plugin adapter and an SPI specification. It has 34 offline tests and is Apache-2.0 licensed.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich thinking effort fits this turn?(inferred)minimal · low · medium · high · max

How it works

  1. Before a turn, query the local daemon.
  2. Daemon asks Jev for the right effort.
  3. Set the thinking level; keep the model fixed.
  4. Fail open to the current level on errors.

Strengths

  • Preserves prompt cache by not switching models.
  • Self-managed daemon with no extra services.
  • Hermes adapter included.

Caveats

  • Only adjusts effort, not model.
  • Requires Python for the daemon.

Getting started

pi install npm:pi-jev-thinking-router, then /route on.

At a glance

Type
Library
Status
beta
Language
TypeScript
Runtime
Pi/omp extension, Python daemon
Has code
yes
Has tests
yes
License
Apache-2.0

Use cases and integrations

How curated lists describe it

Frequently asked questions

Does it switch models?

No, it only adjusts thinking effort to keep the prompt cache.

Why not turn thinking off?

Disabling it is excluded to avoid cache misses on reasoning models.

What runs locally?

A stdlib-only Python daemon on 127.0.0.1:8790, started automatically.

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
  • Hermes Agent plugin that picks the model each turn with a direct TypeSafe Jev Choice and enforces trim-then-compress context handling.

    PluginbetaPython
  • Hermes Agent plugin where Jev picks both the model and reasoning effort for every turn on Ollama:Cloud.

    ProjectbetaPython
  • 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