Guardrails & review
Runtime authorization and guardrails for AI-agent tool calls with deterministic policy and TypeSafe Jev via OpenRouter.
JEV_MODEL: z.string().default("typesafe/jev-1.13"),The link points at the commit we read, so the line number still holds.
These question sets are lifted from this project's source exactly as written.
from packages/decision-provider/test/openrouter.live.test.ts:12
wants_refundtrue/falseDoes the user explicitly request a refund?
intentchoiceWhat is the requested outcome?
refund — Refund a chargeexplain — Explain a chargeimport { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
wants_refund: { type: 'boolean', instructions: 'Does the user explicitly request a refund?' },
intent: { type: 'choice', instructions: 'What is the requested outcome?',
criteria: { refund: 'Refund a charge', explain: 'Explain a charge' } },
},
});