Building the Jev router
Video lesson
This video comes with the full course
Timestamps (9)
Custom Pi Model Router
Building the Jev router
I scaffold an npm project with the TypeSafe SDK, have Claude Code build the /jev Pi extension from a detailed prompt, and walk through the generated code. Then I test it live in Pi: simple prompts route from Astra down to GPT-6 Luna, a harder one triggers the cache guard before switching to Sol, and I finish by adding a thinking-level choice and publishing the extension as @zazencodes/pi-jev-model-router.
Topics
- Set up the project: export
TYPESAFE_API_KEY, runnpm init -y, and install@typesafe-ai/sdk - Read the build prompt: the Jev
Choicecriteria for simple, standard and complex, theMODELSmap for OpenAI Codex, and thectx.ui.confirmcache guard - Walk through
jev-model-router.ts:pi.registerCommand("jev", ...), the mid-session check,setModel, andsendUserMessage - Watch Jev route “what is in this dir?” to Luna, keep a node_modules question on Luna at 65%, and send a feature request to Sol
- See the cache guard warn before a Luna to Sol switch, cancel on No, and route without asking when the prompt is the first in the session
Timestamps
- 0:00 - Set up the TypeSafe API key and Pi
- 1:42 - Scaffold the jev-model-router project
- 2:41 - Prompt Claude to build the extension
- 5:10 - Walk through the generated code
- 7:25 - Export the key and load the extension in Pi
- 8:25 - Route simple prompts to GPT-6 Luna
- 9:52 - Trigger the cache guard with a harder prompt
- 11:33 - Let Jev pick the thinking level too
- 12:59 - Ship the extension to GitHub and npm
Comments (0)
No comments yet.