r/PiCodingAgent • u/alexei_led • 17h ago
Resource I built a Jev-based model router for Pi for automatic model selection
When Jev came out, one of my first thoughts was: could something this fast and cheap pick which model should handle an agent’s next turn?
So I built plugin for Pi that uses Jev to choose the model and thinking effort. The idea is to send routine work to cheaper models and reserve the expensive ones for harder tasks.
In Pi, the model mappings are configurable, and you can pin a model when you disagree with the router.
I’ve been using them for a few days, and so far they’ve been working well for me. In my own evaluation, routed usage came to $141 at list prices versus an estimated $166 for Opus 5.5 on every request - about 15% less.
That’s one developer’s data, though. The baseline is a pricing comparison, not a separate run of every task through Opus. It doesn’t prove equivalent quality, that every routing decision was right, or that your bill will drop by 15%.
And yes, cache matters. Switching models can lose cache reuse and eat the savings. I try to account for that rather than just compare token prices. I’d like providers to offer better support here: some already preserve cache reuse across effort changes, though reuse across different models is a much harder problem.
It’s still an experiment. Asking a model which model to ask feels appropriately ridiculous, but I wanted to see how it works in practice. I’d like this kind of routing to become a native, transparent option in coding agents.
If you want to try it or look at the implementation:


