Skip to main content

Jev Router

Tool · A Claude Code mod that sends every request to the right model: Haiku, Opus or Fable for code, OpenAI for images and approved security reviews.

Jev Router transformation
Technology

Jev Router is a mod for Claude Code, Anthropic's coding agent. Before each request runs, it asks a classifier which kind of work it is, picks the model that fits, and holds every step of that turn to the choice. A person stays in the loop whenever the call is uncertain, expensive, or would send code to another company.

The Problem

An AI coding agent usually runs one model for everything. That means paying top-tier prices to answer "what does this command do," or getting a lighter model on an architecture decision that deserved the best one. Routing by hand works for a few prompts and is forgotten by the tenth. Some work also belongs with a different vendor entirely: Claude does not generate images, and a security review can be worth a second opinion from OpenAI's Daybreak program.

The goal was the right model for each piece of work, chosen automatically, without losing sight of cost or control.

The System

Each prompt, plus the end of Claude's last reply so short follow-ups like "yes, do that" keep their context, goes to Jev, a calibrated classifier from TypeSafe. Jev scores it against five plain-language route descriptions and returns a probability for each, plus two side checks: is this security work, and is this a premium image. The route descriptions are the routing policy, so tuning the router means editing a paragraph, not code.

Lookups, summaries and small edits go to Haiku. Ordinary engineering goes to Opus, which is also the fallback for everything. Architecture and long, ambiguous work go to Fable. Image requests run on Haiku, which drives two image tools that generate and edit through OpenAI. Security work runs on Opus and, once approved, is handed to OpenAI Daybreak through the Codex CLI in read-only mode. Daybreak reads the project, returns its findings to Claude, and Claude applies fixes only if asked. In a test project it flagged a planted SQL injection as critical, along with a query that exposed every user column. In early testing, Jev answered in about a tenth of a second.

A Person Stays in Charge

The router decides on its own only when it is sure. Below a confidence threshold, it shows its ranking and asks. Fable, the most expensive model, always asks first. Security work asks "Send it to OpenAI Daybreak?" and the tool that sends code out refuses on any turn without an explicit yes, so code never leaves for another vendor unasked. If nobody answers, the turn runs on Opus. A /route command overrides, locks, or explains the last decision, and the status line always shows which model is running, who chose it, and how confident it was.

Cost-Aware, Not Just Cheap

Switching models is not free. Prompt caching is per model, so moving a long conversation from Opus down to Haiku can mean rebuilding the whole cache on Haiku. Before any move down, the router estimates the turn's cost on both models, cache rebuild included, using what it has learned from recent turns. If staying on Opus is cheaper, it stays, and says why. Moves up, image work, security work and anything the user picks always switch.

Every decision, override and finished turn is logged with its token usage. The turns where the user overrode the classifier become labeled data for tuning the route descriptions and the threshold.

How It Was Built

The mod is TypeScript on Claude Code's mod engine, using four hook points: one to decide the route when a prompt arrives, one to enforce it on every model request of the turn, one to give subagents the same route, and one to log usage. A suite of 50 tests drives it with every outside service answered in memory, covering confident routing, the asks, every fallback, cache holds, the Daybreak approval gate, and both image backends. It was built and tested on Windows, where outside tools are run by absolute path, because a command that works from one terminal can be missing from another.

The image at the top of this page was made with the router. A request for a LinkedIn graphic was routed to image work, and the follow-up edits ("change the two pictures," "move Jev to the top") stayed on that route.

Why It Matters

Most organizations adopting AI will run more than one model and more than one vendor. The useful question is not which model is best, but which model is right for this request, at this cost, under these rules. Jev Router is a working answer at the scale of one developer: an explicit, editable policy, a calibrated classifier, a person in the loop for the decisions that matter, and a log that shows what happened and why.

Who It Serves

Developers and teams using Claude Code who want lower model spend without giving up quality on hard work, and technology leaders working out how to govern a multi-model, multi-vendor AI stack.

Ready to get your AI into production?

Book a 30-minute conversation to discuss your AI goals. No pressure, no commitment: just a conversation about what's possible.