Agent 工具
在约1秒内为任何任务选择最佳AI模型和推理方案,支持Claude Code、Claude Desktop和Codex,结合TypeSafe的Jev决策模型和实时OpenRouter定价,平衡智能、速度和成本。
Pick the best AI model and reasoning effort for any task in ~1s. Plugin for Claude Code, Claude Desktop and Codex, powered by TypeSafe's Jev decision model and live OpenRouter pricing. Balance intelligence, speed and cost, or choose your priority.
const typesafeBaseUrl = (clean(env.TYPESAFE_BASE_URL) ?? 'https://api.typesafe.ai').replace(/\/+$/, '');链接指向我们抓取当天的那个 commit,行号是准的。
下面是从这个项目源码里原样取出来的 question 组合。
needs_vision是/否Does the work in `task` require viewing an image or visual file, such as a screenshot, photo, UI mockup, diagram image, video, or scanned PDF? Code, logs, text files, and data dumps are not images. ${SCOPE}
needs_tools是/否Is `task` a long autonomous job in which the model must use tools over many steps, such as editing many files, running commands, and re-running tests until they pass? A single question or one focused change does not count.
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
needs_vision: { type: 'boolean', instructions: 'Does the work in `task` require viewing an image or visual file, such as a screenshot, photo, UI mockup, diagram image, video, or scanned PDF? Code, logs, text files, and data dumps are not images. ${SCOPE}' },
needs_tools: { type: 'boolean', instructions: 'Is `task` a long autonomous job in which the model must use tools over many steps, such as editing many files, running commands, and re-running tests until they pass? A single question or one focused change does not count.' },
},
});is_code是/否Does `task` ask for code?
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
is_code: { type: 'boolean', instructions: 'Does `task` ask for code?' },
},
});