Infrastructure

jev-model-router

@az97131JavaScriptupdated 2026-09-20runnable

Jev (TypeSafe) model router on the Vercel AI Gateway

az9713/jev-model-router

Where it calls Jev

import { experimental_evaluate as evaluate } from "ai";

eval.mjs:3

The link points at the commit we read, so the line number still holds.

What it asks Jev

These question sets are lifted from this project's source exactly as written.

from probe.mjs:8

  1. tierchoice

    Which model tier should answer this message?

    • nanoGreeting or trivial chat
    • balancedNeeds real reasoning or code
  2. is_greetingtrue/false

    Is this only a greeting?

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    tier: { type: 'choice', instructions: 'Which model tier should answer this message?',
      criteria: { nano: 'Greeting or trivial chat', balanced: 'Needs real reasoning or code' } },
    is_greeting: { type: 'boolean', instructions: 'Is this only a greeting?' },
  },
});

Other projects in this category