Vercel Jev: How to Set Up Jev on Vercel AI Gateway
Sep 30, 2026

Vercel Jev: How to Set Up Jev on Vercel AI Gateway

Vercel Jev setup guide: call typesafe-ai/jev on Vercel AI Gateway with the AI SDK evaluate API, plain HTTP or the TypeSafe SDK. Working code and pitfalls.

Vercel is where a lot of developers first heard about Jev: a Vercel engineer told TechCrunch that swapping an LLM safety classifier for Jev made it five to 18 times faster. So you open your Next.js project, reach for generateText, set the model to Jev — and it does not work. On Vercel, Jev is not a language model at all. It sits behind a different function, uses a different model id, and even renames one of its question types.

This guide covers everything the Vercel Jev search is really asking: whether Jev is on Vercel AI Gateway, the exact AI SDK call and model id, how to authenticate, how to call it from Python or an existing TypeSafe client, and how to escalate the uncertain answers. For the model itself — what a System One model is and why it returns probabilities instead of prose — see our guide to what Jev AI is.

We build jev-ai.org on Jev, which we call through OpenRouter rather than Vercel, so we have not run the samples below on AI Gateway ourselves. Every code sample is taken from, or checked line by line against, Vercel's AI Gateway documentation, the AI SDK reference and Vercel's own Jev guide as they read on September 30, 2026.

Last updated September 30, 2026. experimental_evaluate is an experimental AI SDK API and Vercel says it may change in patch releases — the linked docs are the source of truth.

Is Jev on Vercel AI Gateway? The Short Answer

Yes. Jev is on Vercel AI Gateway as typesafe-ai/jev, and you call it with the AI SDK's experimental_evaluate function — not generateText. Vercel announced it on September 16, 2026, the day after TypeSafe's launch. AI SDK 7.0.105 or later is required.

Jev on Vercel AI Gateway
Model idtypesafe-ai/jev
Model typeEvaluation (not text generation)
AI SDK functionexperimental_evaluate from ai, version 7.0.105+
Other entry pointsHTTP POST https://ai-gateway.vercel.sh/v1/evaluate · TypeSafe-compatible base URL https://ai-gateway.vercel.sh/typesafe
Question typeschoice, score, boolean (TypeSafe calls the last one noul)
Price$0.042 per million input tokens; no output charge
Providers listedTypeSafe AI and DigitalOcean
Data controlsZero Data Retention and No Training, set per request
Not available throughThe OpenAI-, Anthropic- and Cohere-compatible endpoints

The model page lists a 32K context; Vercel's Jev guide describes TypeSafe's budget in full — 64K tokens per request, 32K for the state. Plan around the smaller number and split long inputs.

Five Differences That Trip Up Vercel Jev Setups

Every other guide shows the happy path. These are the details that cost you the first hour, collected by comparing Vercel's docs with the TypeSafe and OpenRouter request shapes.

If you are used to…On Vercel AI Gateway it is…Why it matters
generateText / streamTextexperimental_evaluateJev returns typed answers, so it lives on the evaluation API; it does not stream
Question type noulbooleanThe AI SDK uses a neutral name and maps it to TypeSafe's noul
Answer field noulprobabilityresult.answers.refund.probability, not .noul
confidence inside each answerresult.providerMetadata.typesafe.confidence, keyed by question idConfidence is TypeSafe-specific, so the SDK keeps it out of the portable answer
Model id typesafe/jev-1.13 (OpenRouter) or jev-1.13 (jev-ai.org)typesafe-ai/jevCopying an id from another route gives you a NoSuchModelError

There is one more rule worth knowing up front: a plain string such as 'typesafe-ai/jev' resolves through AI Gateway only when you have not configured a default provider of your own. If your app sets globalThis.AI_SDK_DEFAULT_PROVIDER, that provider must be evaluation-capable or the call fails — evaluation never silently falls back to Gateway.

How to Use Jev in Vercel AI Gateway, Step by Step

You need a Vercel account, the Vercel CLI, Node.js 22 or later and a Next.js App Router project.

Step 1: Install the AI SDK and authenticate

pnpm i ai
vercel link
vercel env pull

vercel env pull writes a VERCEL_OIDC_TOKEN to your env file, and a plain string model id routes through AI Gateway using that token. Deployments on Vercel receive the token automatically. Locally it expires after 12 hours, so rerun vercel env pull when a request suddenly returns 401. Outside Vercel, set AI_GATEWAY_API_KEY instead.

Step 2: Ask one yes-or-no question

import { experimental_evaluate as evaluate } from 'ai';

export async function wasRefunded(transcript: string) {
  const result = await evaluate({
    model: 'typesafe-ai/jev',
    state: transcript,
    questions: {
      refunded: {
        type: 'boolean',
        instructions: 'Was a refund issued to the customer?',
        criteria: {
          true: 'The agent confirmed that money was returned to the customer.',
          false: 'No refund was issued, or the refund was declined.',
        },
      },
    },
  });

  return result.answers.refunded.probability;
}

Each key in questions comes back as a key in answers. A boolean answer is a single number: 0.98 is a strong yes, 0.02 a strong no, 0.5 a coin flip. The criteria on a boolean question are optional, but spelling out what counts as true and false sharpens the answer.

Step 3: Ask several questions about the same state in one call

Jev evaluates every question independently and in parallel, so adding questions barely changes latency, and state can be a JSON object rather than a string. This route handler follows Vercel's own triage example:

import { experimental_evaluate as evaluate } from 'ai';

export async function POST(request: Request) {
  const ticket = await request.json();

  const result = await evaluate({
    model: 'typesafe-ai/jev',
    state: {
      subject: ticket.subject,
      message: ticket.message,
      plan: ticket.plan,
    },
    questions: {
      department: {
        type: 'choice',
        instructions: 'Which team should handle this ticket?',
        criteria: {
          billing: 'Charges, invoices, and refunds',
          technical: 'Bugs, outages, and integration failures',
          account: 'Login, permissions, and profile changes',
        },
      },
      severity: {
        type: 'score',
        instructions: 'How severe is the issue for the customer?',
        criteria: [
          'Cosmetic or informational',
          'Degraded, but a workaround exists',
          'Blocking with no workaround',
        ],
      },
      requestsRefund: {
        type: 'boolean',
        instructions: 'Is the customer asking for money back?',
      },
    },
    providerOptions: {
      gateway: { zeroDataRetention: true },
    },
  });

  return Response.json(result.answers);
}

Three things in the answer deserve attention:

  • department.choice is typed as a union of your keys, so TypeScript catches choice === 'tech' at compile time.
  • severity.score is a float — the probability-weighted position on your rubric, indexed from zero. A 1.86 means "mostly blocking, some chance of a workaround", which sorts correctly where a rounded 2 would not.
  • Probabilities are rounded to two decimals by TypeSafe, so a distribution can add up to 0.99. The SDK accounts for that; do not renormalise it yourself.

The providerOptions.gateway block is optional. Jev supports Zero Data Retention and No Training per request, and evaluation calls show up in AI Gateway logs and count toward budgets like any other model.

Step 4: Branch on probability and confidence

The point of Jev is that clear cases can run automatically and unclear ones can stop. Vercel's guide routes a ticket only when both numbers clear a floor:

const { department } = result.answers;
const confidence = result.providerMetadata?.typesafe?.confidence as
  | Record<string, number>
  | undefined;

const departmentConfidence = confidence?.department ?? 0;
const selectedProbability = department.probabilities?.[department.choice] ?? 0;

if (departmentConfidence < 0.6 || selectedProbability < 0.7) {
  // Ambiguous: send to a human instead of guessing.
}

Treat 0.6 and 0.7 as starting points. Calibration is measured across many predictions, not promised for any single one, so run a set of tickets with known outcomes through the same questions and choose cut-offs from the mistakes your workflow can afford. Destructive actions deserve a higher bar than read-only ones.

A fast way to find good questions before you touch your codebase: paste a few real tickets into the Jev AI playground, adjust the wording and criteria until the probabilities split the way a person would, then copy the questions across. The request shape is the same, apart from the boolean → noul rename.

Step 5: Use the Gateway provider instance when you need one

If you need custom headers, a custom fetch or a different Gateway base URL, use the explicit provider instead of a string. The two forms are interchangeable.

import { gateway } from '@ai-sdk/gateway';
import { experimental_evaluate as evaluate } from 'ai';

const result = await evaluate({
  model: gateway.evaluationModel('typesafe-ai/jev'),
  state: 'I was charged twice. Please refund the duplicate.',
  questions: {
    requestsRefund: {
      type: 'boolean',
      instructions: 'Is the customer requesting money back?',
    },
  },
});

Calling Jev on Vercel Without the AI SDK

From Python or any language: the HTTP evaluate endpoint

AI Gateway exposes the same capability over plain HTTP, with the same model, state and questions fields:

curl https://ai-gateway.vercel.sh/v1/evaluate \
  -H "Authorization: Bearer $AI_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "typesafe-ai/jev",
    "state": "I was charged twice for my subscription.",
    "questions": {
      "refund": {
        "type": "boolean",
        "instructions": "Is the customer asking for money back?"
      }
    }
  }'

The response carries the answers, token usage in inputTokens / outputTokens, and the cost of the call under providerMetadata.gateway.cost. In Vercel's documented example, 275 input tokens cost $0.00001155. The endpoint accepts the same providerOptions as the rest of AI Gateway, so you can require Zero Data Retention or restrict providers with "only": ["typesafe-ai"]. It also works with BYOK: if your team has added a TypeSafe key, Gateway uses it automatically.

Already using the TypeSafe SDK: change the base URL

If your code already calls TypeSafe, keep it and point it at Gateway:

import { TypeSafeClient } from '@typesafe-ai/sdk';

const client = new TypeSafeClient({
  apiKey: process.env.AI_GATEWAY_API_KEY,
  baseURL: 'https://ai-gateway.vercel.sh/typesafe',
});

const result = await client.systemOne({
  state: 'I was charged twice for my subscription.',
  questions: {
    refund: { type: 'noul', instructions: 'Is the customer asking for money back?' },
  },
});

This TypeSafe-compatible route keeps TypeSafe's own names — noul in, noul out — and passes provider errors through unchanged. Vercel recommends the evaluation API above for new code.

Calling TypeSafe directly from the AI SDK

The AI SDK also has a direct TypeSafe provider, @ai-sdk/typesafe-ai, which skips Gateway and bills your TypeSafe account. It reads TYPESAFE_AI_API_KEY and is used as typeSafeAi.evaluationModel('jev-latest'). Choose it only if you have direct TypeSafe access; otherwise the Gateway string is simpler.

Escalating Uncertain Answers With Evaluation Fallbacks

This one is specific to Vercel: AI Gateway can rerun a successful but uncertain evaluation on another model. You add one conditional object to providerOptions.gateway.models, and it applies to experimental_evaluate, /v1/evaluate and the TypeSafe-compatible API alike. This is Vercel's documented form:

providerOptions: {
  gateway: {
    models: [
      {
        model: 'openai/gpt-6-astra',
        when: { question: 'intent', confidenceBelow: 0.6 },
      },
    ],
  },
},

Two things to budget for. A triggered request is billed for both stages. And when a language model produces the final choice or score, confidence: 0 and empty probabilities mean "not available", not "zero confidence" — only a native evaluation model returns real distributions. Evaluation fallbacks are opt-in and marked beta in Vercel's docs.

What Vercel Itself Did With Jev

The Vercel result that circulated after launch is a customer anecdote, not a benchmark, and it is worth reading precisely. According to TechCrunch, a Vercel software engineer said the company had been using an OpenAI model to run a classifier that reviews commands for safety. Replacing it with Jev returned results five to 18 times more quickly, and with greater accuracy.

That is exactly the shape of task Jev is built for — one narrow judgement, made many times, where the code acts on the answer. Vercel's own changelog lists similar jobs: choosing the next tool or subagent, deciding whether an agent should continue or stop, scoring risk before an action, and verifying model outputs. TypeSafe's headline multipliers (up to 193.6× faster and 444.6× cheaper on its own workflow evaluations) are vendor figures; measure on your own traffic before you plan around them.

Vercel AI Gateway, OpenRouter or jev-ai.org?

RouteBest forModel idQuestion types
Vercel AI GatewayNext.js and TypeScript apps on the AI SDK; teams that want Gateway logs, budgets and fallbackstypesafe-ai/jevchoice, score, boolean
OpenRouterTeams billing through OpenRouter; any language over plain HTTP — see our OpenRouter Jev guidetypesafe/jev-1.13choice, score, noul
jev-ai.orgDesigning questions in a playground, scoring a CSV, or an API with request-level safeguardsjev-1.13, jev-latestchoice, score, noul

If your stack is Python rather than TypeScript, LangChain's official package is usually the shorter path — our LangChain Jev tutorial walks through it.

jev-ai.org is the option for the work around the call. The Jev AI API takes the same state and questions body, validates choice and score criteria before the request runs and names the question that is wrong, supports idempotency keys, and never charges for a failed request. Batch processing scores a whole CSV without a line of code, and new accounts get five free credits with no card.

Troubleshooting Jev on Vercel

  • 401 or 403. Your OIDC token expired or the directory is not linked. Run vercel link, then vercel env pull. If a 403 persists, check your access to the project and to AI Gateway.
  • NoSuchModelError with modelType: 'evaluationModel'. The id is wrong (it must be typesafe-ai/jev) or the call is resolving through a default provider that has no evaluation models.
  • Unsupported question type. Jev supports choice, score and boolean. The AI SDK checks this before any network call, and one unsupported question fails the whole request.
  • "Evaluation is unavailable" from an OpenAI-compatible client. Expected. Evaluation is only on the AI SDK, /v1/evaluate and the TypeSafe-compatible API.
  • InvalidResponseDataError. The provider returned an answer that fails validation, such as a missing option. Retry; if it persists, report the questions and response.

FAQ

Is Jev available on Vercel?

Yes. Jev is available on Vercel AI Gateway as typesafe-ai/jev, announced on September 16, 2026. You call it through the AI SDK's experimental_evaluate, the /v1/evaluate HTTP endpoint or the TypeSafe-compatible API.

How do I use Jev with the Vercel AI SDK?

Install ai 7.0.105 or later, authenticate with Vercel OIDC or an AI Gateway key, and call experimental_evaluate with model: 'typesafe-ai/jev', a state and a map of questions. generateText and streamText do not work with Jev.

How much does Jev cost on Vercel AI Gateway?

Vercel lists Jev at $0.042 per million input tokens with no output charge. Each HTTP evaluate response reports its own cost under providerMetadata.gateway.cost; Vercel's example shows $0.00001155 for 275 input tokens.

Can Claude Code or Cursor use Jev through Vercel?

Not as their model. Jev cannot write code or text, and AI Gateway does not serve evaluation through its Anthropic- or OpenAI-compatible endpoints. Where Jev helps coding agents is as a gate on their actions — for example, scoring whether a proposed command is safe before it runs.

Why does Vercel call it boolean when TypeSafe calls it noul?

The AI SDK uses provider-neutral names so the same code can run against other evaluation models. boolean maps directly to TypeSafe's noul, and the answer arrives as probability instead of noul.

The Bottom Line

Jev works on Vercel today, but only if you treat it as the evaluation model it is.

  • Call experimental_evaluate with model: 'typesafe-ai/jev' — never generateText.
  • Remember the renames: boolean for noul, probability for the answer, confidence under providerMetadata.typesafe.
  • Outside TypeScript, use POST /v1/evaluate; with an existing TypeSafe client, change the base URL to /typesafe.
  • Route clear answers automatically, send uncertain ones to a person or an evaluation fallback, and tune thresholds on labelled data.

The slowest part of any Jev integration is writing questions that split cleanly. Try your questions on real text in the Jev AI playground first, then paste the finished request into your route handler — or call the jev-ai.org API directly if you would rather not route through Gateway.

Sources

Prices, providers and SDK versions are as published on September 30, 2026. experimental_evaluate is experimental and may change in patch releases.

Try Jev AI Free in the Playground

Wondering how to try Jev AI? Sign in, take the five welcome credits and run it — no card required.