shipwithjev

Catalog / Tools & apps

0045GitHub

pi-jev-router

A Pareto-optimal OpenRouter router for Pi, decided by Jev.

Philipp Dubach’s router asks Jev what a task needs, then picks the cheapest OpenRouter model on the quality-and-price frontier that meets it.

philippdubach/pi-jev-routerREADME ↗
# pi-jev-router: a minimal Pareto-optimal OpenRouter model router for pi, based on Jev

Jev-classified model routing for pi.

## Model rules

The router ranks the whole OpenRouter catalog for each task. It filters the
catalog to models that fit the task, computes a Pareto frontier over quality,
cost and latency, then picks the knee point. The knee is the frontier member
farthest from the chord that joins the cheapest and dearest models. It needs no
weights, so the pick follows the catalog and the recorded evidence on every
task. A frontier too small or too flat for a knee falls back to a weighted value
function.

Quality blends recorded runs from `eval/results` with the Artificial Analysis
index. Writing quality uses the EQ-Bench Creative Writing v3 Elo in
`src/writing-prior.ts` instead, because a general intelligence index says
nothing about prose. Cost is a per-task estimate from catalogue prices,
replaced by recorded mean cost as runs accumulate. Latency uses recorded means
when they exist.

There is one selection policy. `src/selector.ts` holds a small fallback table
for the case where the catalog cannot be fetched and no frontier exists.

Writing tasks get STE and Humanizer rules. Code tasks run unit tests.
Planning tasks get a structure check.

## Commands

```text
/router           show status
/router shadow    recommend only (default)
/router auto      switch models per task
/router off       stop routing
/router frontier  show the frontier for the last decision
/router pin <id>  force a model
/router pin off   release the pin
/router budget <usd>
/router test      classify a sample task and show the pick
```

## Benchmarks

```bash
npm run bench              # fixed baseline vs frontier router
npm run bench -- --all     # adds the pinned role arm as a third con

Also filed under Tools & apps

  1. 0573

    Support chat: agent offered a human escalation path

    A frustrated customer hits a bot loop twice; the judge checks whether a human handoff was offered.

    everyai-com · Tools & apps

  2. 0572

    Subscription cancel: effective date is explicit

    An agent cancels a subscription; the judge checks the exact date the cancellation takes effect.

    everyai-com · Tools & apps

  3. 0571

    Sales quote: numbers match the official price list

    An agent quotes $29/seat against a price list; the judge checks the quote matches exactly.

    everyai-com · Tools & apps

  4. 0570

    Refund chat: agent stated the amount before issuing it

    A support agent issues a $42.50 refund; the judge checks the exact amount was stated before the refund was confirmed.

    everyai-com · Tools & apps