← Catalog

@smg1024/jev-router

Pi extension that adds a virtual jev/auto model routing each task to a physical model and thinking effort via Jev classification.

Extension

Install

Install with PiG

pig install npm:@smg1024/jev-router

Install with Pi

pi install npm:@smg1024/jev-router
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./extensions/index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.3 (README.md). PiG does not review it.

@smg1024/jev-router

A Pi package that adds a virtual model, jev/auto. For each new user task it asks the Jev classifier (typesafe/jev-latest) to pick:

  • a physical chat model from the eligible catalog, and
  • a thinking effort (off … xhigh).

Continuations, retries, and compaction reuse the previous decision, so a turn stays on one model.

Install

pi install npm:@smg1024/jev-router

Then make jev/auto the default in ~/.pi/agent/settings.json:

{
  "defaultProvider": "jev",
  "defaultModel": "auto"
}

To install from Git instead, use pi install git:github.com/smg1024/jev-router.

Requirements

  • A Typesafe API key for the typesafe/jev-latest classifier. Inside Pi, run /login and choose Typesafe, or set TYPESAFE_API_KEY in your environment.
  • At least one physical chat model with credentials configured.
  • For image prompts, at least one eligible model that accepts image input.

Behavior

SituationResult
New user taskJev picks a model and effort from the eligible catalog
continuation / retryReuses the previous (or failed) model and effort
direct (internal calls)First eligible model, low effort, no classification
enabledModels / --models setOnly those models are eligible
Virtual models (pi-virtual)Never chosen as a target

Errors are raised for: no eligible model, missing classifier, classifier failure, or an invalid classifier choice.

Test

bun run test

The test uses a mock Jev classifier and does not call any API.

License

MIT