Agent 工具

JevRouter

@BillionsBobby94TypeScriptMIT更新于 2026-09-19可当场跑

一个基于Jev的轻量级路由器,用于模型、工具和子agent的管理。

英文原文

A lightweight Jev-powered router for models, tools, and subagents

BillionsBobby/JevRouter

它在哪儿调用了 Jev

this.endpoint = options.endpoint ?? "https://api.typesafe.ai/v1/systemone";

src/provider.ts:72

链接指向我们抓取当天的那个 commit,行号是准的。

它问 Jev 的问题

下面是从这个项目源码里原样取出来的 question 组合。

取自 tests/primitives.test.ts:61

  1. severity打分

    How severe is this?

    • 0trivial
    • 1minor
    • 2major
    • 3critical
  2. needs_tool是/否

    Does handling this require a tool?

用你自己的内容跑一遍

代码
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    severity: { type: 'score', instructions: 'How severe is this?',
      criteria: ['trivial', 'minor', 'major', 'critical'] },
    needs_tool: { type: 'boolean', instructions: 'Does handling this require a tool?' },
  },
});

取自 tests/primitives.test.ts:91

  1. severity打分

    How careful should we be?

    • 0casual
    • 1careful
  2. needs_tool是/否

    Is a read needed?

用你自己的内容跑一遍

代码
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    severity: { type: 'score', instructions: 'How careful should we be?',
      criteria: ['casual', 'careful'] },
    needs_tool: { type: 'boolean', instructions: 'Is a read needed?' },
  },
});

取自 tests/primitives.test.ts:111

  1. team选项

    Which team should handle this?

    • paymentsbilling and checkout issues
    • frontendbrowser rendering issues

用你自己的内容跑一遍

代码
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    team: { type: 'choice', instructions: 'Which team should handle this?',
      criteria: { payments: 'billing and checkout issues', frontend: 'browser rendering issues' } },
  },
});

同类的其他项目