Infrastructure

jcm-router

@adarshmishra072TypeScriptMITupdated 2026-09-17runnable

Local proxy that picks the Claude model and effort per message using TypeSafe Jev. Routes subagents, leaves your cached main chat alone.

adarshmishra07/jcm-router

Where it calls Jev

typesafeApiUrl: "https://api.typesafe.ai",

src/env.ts:24

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 src/routing-policy.ts:192

  1. modelchoice

    Which model tier fits the task in `latest_user_message`?

    • whatThe hardest and longest work: ambiguous goals that need research and planning before code, large refactors or migrations across a codebase, architecture with many tradeoffs, tasks where a mistake is very costly and hard to undo.
    • not_forAnything with a clear, bounded scope, even if difficult (opus).
  2. effortchoice

    How much deliberation does the task in `latest_user_message` need before answering or acting?

    • whatCorrectness dominates cost and time: security analysis, complex algorithms, large migrations, anything hard to undo.
    • not_forAnything that is merely difficult (xhigh).
  3. is_followuptrue/false

    Is `latest_user_message` a short continuation of `previous_assistant_reply` that only makes sense given that reply: a confirmation ('yes', 'do it', 'go ahead', 'continue'), a choice among options the assistant offered, or a small tweak to what was just proposed?

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: {
    model: { type: 'choice', instructions: 'Which model tier fits the task in `latest_user_message`?',
      criteria: { what: 'The hardest and longest work: ambiguous goals that need research and planning before code, large refactors or migrations across a codebase, architecture with many tradeoffs, tasks where a mistake is very costly and hard to undo.', not_for: 'Anything with a clear, bounded scope, even if difficult (opus).' } },
    effort: { type: 'choice', instructions: 'How much deliberation does the task in `latest_user_message` need before answering or acting?',
      criteria: { what: 'Correctness dominates cost and time: security analysis, complex algorithms, large migrations, anything hard to undo.', not_for: 'Anything that is merely difficult (xhigh).' } },
    is_followup: { type: 'boolean', instructions: 'Is `latest_user_message` a short continuation of `previous_assistant_reply` that only makes sense given that reply: a confirmation (\'yes\', \'do it\', \'go ahead\', \'continue\'), a choice among options the assistant offered, or a small tweak to what was just proposed?' },
  },
});

Other projects in this category