Skip to content

pi-thinking-router-jev

Adaptive thinking-level router for Pi: Jev or local rules pick low/medium/high/xhigh at task start, on reasoning failures and when stable.

Projectbeta

Overview

pi-thinking-router-jev is an adaptive thinking-level router for Pi that only reads agent state, consults Jev or local rules and calls pi.setThinkingLevel; it does not switch models, change code or take over the agent loop. The README is in Chinese.

It evaluates at task start to choose an initial level, on reasoning-type failures to consider escalating (environment problems like network, Docker or rate limits do not escalate), and after a stable window to consider downgrading. Manual changes enter manual-override until the next task. Jev returns a discrete choice; if Jev is not configured or fails, local rules apply (documentation tasks low, implementation and debugging medium, architecture high). Debounce limits allow one step per change and at most two up or down per task, with cooldowns. Every decision is logged to JSONL. It includes offline unit and integration tests, live connectivity tests and a three-seed A/B benchmark, with results in docs.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich thinking level fits the current task state?low · medium · high · xhigh

How it works

  1. At task start, failure or stable window, build agent state.
  2. Ask Jev for a level, or use local rules.
  3. Apply debounce and bounds.
  4. Set the thinking level and log the decision.

Strengths

  • Never switches models.
  • Local rules fallback when Jev is unavailable.
  • Bounded, debounced changes with logs.

Caveats

  • Task type approximated by keywords.
  • Chinese documentation.

Getting started

Add the repository path to extensions in ~/.pi/agent/settings.json (or pi -e ./index.ts) and configure ~/.pi/thinking-router.json.

At a glance

Type
Project
Status
beta
Language
TypeScript
Runtime
Pi extension
Has code
yes
Has tests
yes

Use cases and integrations

How curated lists describe it

  • Pi-thinking-router-jev —— pi 的自适应 Thinking Level Router。在任务起点、推理型失败与稳定窗口咨询 jev 决策模型(未配置时本地 规则兜底),动态选择 low/medium/high/xhigh 推理档位:简单改动降档、复杂 debug 升级、失败可升级、稳定可降级。含防抖钳制 、失败安全回退与 JSONL 决策日志,不切换模型、零侵入 agent loop。

    hellogumbo/awesome-jev

Frequently asked questions

Does it change models?

No, only the thinking level.

What if Jev isn't configured?

Local rules choose the level.

Do environment errors raise the level?

No, only reasoning-type failures trigger escalation.

Related projects

  • OpenCode orchestrator that keeps a cheap sticky parent model and escalates to strong child subagents only when Jev flags a hard turn.

    ProjectbetaTypeScript
  • Gateway that batches agent control questions through Jev and calls a generative LLM only when policy says generation is needed.

    ServiceprototypeTypeScript
  • 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
  • Runs Claude Code on Opus 5.5 with Jev re-picking reasoning effort after every tool batch, via per-message effort so the cache survives.

    ProxybetaTypeScript
  • Bash-native CLI that filters any stream by meaning with Jev, like grep for semantics, so an agent wakes only for lines that matter.

    ProjectbetaTypeScript