Jev Router Plugin (migrated from Pi ecosystem jev-router.ts).
Dynamic model cascading and phase-based routing:
- Planning Phase: Routes to a high-reasoning frontier model (
planning_model, e.g.gemini-3.1-pro-preview) while the agent is exploring, inspecting, and formulating architectural plans. - Implementation Phase: Once the first
writeoredittool is executed, automatically cascades the session to a fast, cost-effective model (implementation_model, e.g.gemini-3-flash-preview).
Reduces end-to-end token expenditure by 60–80% without sacrificing planning depth.
Configuration Options (ctx[:config] or harness tuple):
:planning_model- Model identifier for planning phase.:implementation_model- Model identifier for implementation phase.:edit_tools- List of tool names that trigger transition to implementation phase (default:["write", "edit"]).- Environment variables:
JEV_PLANNING_MODEL,JEV_IMPLEMENTATION_MODEL.
Summary
Functions
Determines the current work phase (:planning or :implementation) by inspecting whether any edit tools have been called in previous turns.