<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-use-jev-with-the-vercel-ai-sdk-hm94wunr1" -->

---
title: How to use Jev with the Vercel AI SDK | daily.dev
description: A practical walkthrough shows how to use TypeSafe AI's Jev decision model through the Vercel AI SDK's experimental_evaluate function, covering installation of...
canonical: https://daily.dev/posts/how-to-use-jev-with-the-vercel-ai-sdk-hm94wunr1
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to use Jev with the Vercel AI SDK | daily.dev
og:description: A practical walkthrough shows how to use TypeSafe AI's Jev decision model through the Vercel AI SDK's experimental_evaluate function, covering installation of...
og:url: https://daily.dev/posts/how-to-use-jev-with-the-vercel-ai-sdk-hm94wunr1
og:image: https://api.daily.dev/og/posts/hm94wUNR1.png
og:image:alt: How to use Jev with the Vercel AI SDK
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to use Jev with the Vercel AI SDK

**[Flavio Copes](https://daily.dev/sources/flaviocopes)** · 15 min read · 0 upvotes · 0 comments

## Summary

A practical walkthrough shows how to use TypeSafe AI's Jev decision model through the Vercel AI SDK's experimental_evaluate function, covering installation of the @ai-sdk/typesafe-ai provider, environment variable setup, question types (boolean, choice, score), reading TypeSafe's confidence score, routing through Vercel's AI Gateway with zero data retention, calling Jev from a Next.js route handler, and comparing Jev against an LLM like GPT on the same classification questions for accuracy, latency and cost.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://flaviocopes.com/jev-vercel-ai-sdk>

## Questions this post answers

### How do I use the Jev evaluation model with the Vercel AI SDK's experimental_evaluate function?

Install the ai and @ai-sdk/typesafe-ai packages (Node.js 22 or newer required), set the TYPESAFE_AI_API_KEY environment variable, then pass typeSafeAi.evaluationModel('jev-latest') as the model to experimental_evaluate along with a state object and a map of typed questions (boolean, choice, or score). Each question key appears in result.answers with a probability, choice, or score field.

_Developers wiring AI-based decision routing into their apps can track SDK changes like this on daily.dev._

### How do I read TypeSafe AI's confidence score for a Jev evaluation in the Vercel AI SDK?

Confidence is found in result.providerMetadata.typesafe.confidence, keyed by question ID, and is only provided for choice and score question types, not boolean ones, since a boolean's probability already conveys certainty. It ranges near 1 when probability concentrates on one option and near 0 when spread out; it reflects distribution shape, not the chosen option's raw probability.

_Teams tuning routing thresholds for AI classification can follow implementation details like this via daily.dev._

### What's different about using an LLM like GPT instead of Jev for the Vercel AI SDK's experimental_evaluate function?

LLM-based evaluationModel adapters (OpenAI, Anthropic, Google) return choice and score answers without a probabilities distribution, only the picked value, and any boolean probability is the model's own uncalibrated estimate rather than a true probability. There's no confidence field in providerMetadata, the LLM sees all questions in one prompt instead of evaluating independently, and LLM calls bill output tokens while Jev does not.

_Anyone deciding between an LLM and a dedicated evaluation model for classification tasks can compare trade-offs on daily.dev._

---

Tags: [#llm](https://daily.dev/tags/llm), [#typescript](https://daily.dev/tags/typescript), [#nextjs](https://daily.dev/tags/nextjs), [#jev](https://daily.dev/tags/jev)

[View this post on daily.dev](https://daily.dev/posts/how-to-use-jev-with-the-vercel-ai-sdk-hm94wunr1)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to use Jev with the Vercel AI SDK","url":"https://daily.dev/posts/how-to-use-jev-with-the-vercel-ai-sdk-hm94wunr1","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-use-jev-with-the-vercel-ai-sdk-hm94wunr1"},"datePublished":"2026-10-11T12:28:26.207Z","dateModified":"2026-10-11T12:29:42.330Z","description":"A practical walkthrough shows how to use TypeSafe AI's Jev decision model through the Vercel AI SDK's experimental_evaluate function, covering installation of...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e4822d31d00ff3005e77ebc2ee21e270?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e4822d31d00ff3005e77ebc2ee21e270?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Flavio Copes","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Flavio Copes","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9","url":"https://daily.dev/sources/flaviocopes"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-use-jev-with-the-vercel-ai-sdk-hm94wunr1","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"llm,typescript,nextjs,jev","timeRequired":"PT15M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Flavio Copes","item":"https://daily.dev/sources/flaviocopes"},{"@type":"ListItem","position":3,"name":"How to use Jev with the Vercel AI SDK"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-to-use-jev-with-the-vercel-ai-sdk-hm94wunr1#faq","mainEntity":[{"@type":"Question","name":"How do I use the Jev evaluation model with the Vercel AI SDK's experimental_evaluate function?","acceptedAnswer":{"@type":"Answer","text":"Install the ai and @ai-sdk/typesafe-ai packages (Node.js 22 or newer required), set the TYPESAFE_AI_API_KEY environment variable, then pass typeSafeAi.evaluationModel('jev-latest') as the model to experimental_evaluate along with a state object and a map of typed questions (boolean, choice, or score). Each question key appears in result.answers with a probability, choice, or score field. Developers wiring AI-based decision routing into their apps can track SDK changes like this on daily.dev."}},{"@type":"Question","name":"How do I read TypeSafe AI's confidence score for a Jev evaluation in the Vercel AI SDK?","acceptedAnswer":{"@type":"Answer","text":"Confidence is found in result.providerMetadata.typesafe.confidence, keyed by question ID, and is only provided for choice and score question types, not boolean ones, since a boolean's probability already conveys certainty. It ranges near 1 when probability concentrates on one option and near 0 when spread out; it reflects distribution shape, not the chosen option's raw probability. Teams tuning routing thresholds for AI classification can follow implementation details like this via daily.dev."}},{"@type":"Question","name":"What's different about using an LLM like GPT instead of Jev for the Vercel AI SDK's experimental_evaluate function?","acceptedAnswer":{"@type":"Answer","text":"LLM-based evaluationModel adapters (OpenAI, Anthropic, Google) return choice and score answers without a probabilities distribution, only the picked value, and any boolean probability is the model's own uncalibrated estimate rather than a true probability. There's no confidence field in providerMetadata, the LLM sees all questions in one prompt instead of evaluating independently, and LLM calls bill output tokens while Jev does not. Anyone deciding between an LLM and a dedicated evaluation model for classification tasks can compare trade-offs on daily.dev."}}]}
```

