Skip to content

Docs

Vercel AI Gateway: Evaluation Models

AI Gateway's evaluation modality: call Jev as `typesafe-ai/jev` through the AI SDK's experimental_evaluate API, with structured answers instead of free-form text.
Format
Docs
Reading time
3 min
Published by
Community
Last verified
Sep 2026

Highlights

  • experimental_evaluate (aliased from the ai package) needs AI SDK 7 or later; it is not supported through OpenAI-compatible endpoints.
  • Boolean answers return { type: 'boolean', probability }; Choice returns choice plus probabilities for every option.
  • Questions of different types share one state and are answered in one round trip, so adding questions doesn't need extra calls.
  • POST /v1/evaluate at ai-gateway.vercel.sh takes the same model, state, and questions for non-AI-SDK callers.
  • providerOptions.gateway accepts zeroDataRetention and only: ['typesafe-ai'] to constrain which provider serves the request.

Quickstart

ts
import { experimental_evaluate as evaluate } from 'ai';

const result = await evaluate({
  model: 'typesafe-ai/jev',
  state: 'The support agent issued a full refund.',
  questions: {
    refunded: { type: 'boolean', instructions: 'Was a refund issued?' },
  },
});

console.log(result.answers.refunded.probability);

Watch out

Evaluation is not supported through AI Gateway's OpenAI-compatible, Anthropic-compatible, or Cohere-compatible endpoints, so those callers must use experimental_evaluate or the HTTP API.

Questions about this entry

Short answers drawn from the linked project or page.

Reactions & coverage

Posts, threads, and videos about this entry from around the web.

X: Jev lands on the Vercel AI Gateway

X: Vercel ships the AI SDK provider for Jev

YouTube: Greg Isenberg and Ryan Vogel on the businesses Jev unlocks, and a path in through the Vercel AI Gateway.

From the Jev guides

Original write-ups on what this entry is for.

From the Jev AI model community

Posts from builders shipping with Jev right now.

Follow @typesafeai