Published
Vercel's form router keeps Jev's destination when confidence is at least 0.95
Vercel published a Next.js template that asks Jev to pick a team for a form submission and sends the same submission to GPT-5.6 Luna Fast when confidence is below 0.95, missing, or the call fails. The fallback does not see Jev's answer. Tests mock both models.
The AI SDK account posted on September 21 that Jev is free on Vercel AI Gateway until September 25, and pointed at a form router template. The guide is by Ben Sabic. The repo is vercel-labs/jev-ai-sdk-form-router, MIT, copyright 2026 Vercel, Inc. It is a Next.js app. Both models go through AI Gateway. A Vercel deployment authenticates with an OIDC token from the Gateway.
Each submission is one Choice. experimental_evaluate sends the whole form to typesafe-ai/jev with the destination ids and a criterion for each. The app keeps that destination when TypeSafe’s confidence metadata for the question is a number from 0 to 1 and is at least 0.95. The comparison uses the unrounded value, so 0.94999 goes to the fallback even when the UI shows 95.00%. Confidence is a summary of the distribution. The probability on the chosen destination is stored beside it. The gate reads confidence only. A mocked test accepts confidence 0.96 when the selected option’s probability is 0.7, and rejects confidence 0.94999 when that probability is 0.999.
Below the line, or if the metadata is missing or the call errors, generateText asks openai/gpt-5.6-luna-fast for one registered destination. The prompt is the same question and the same submission. Jev’s answer and statistics are left out. Luna’s valid answer is final, with no second confidence check. The result keeps Jev’s original destination either way. fallbackReason is low-confidence, missing-confidence, jev-error, or null when Jev was accepted. If Luna also fails, the app returns no destination.
Jev’s timeout is 12 seconds, including one retry. Luna’s is 25 seconds, reasoning low, at most 1,000 output tokens. The page maxDuration is 60 seconds. Zod builds the schema from the form’s fields, trims values, and drops anything unregistered, including a client-supplied destination or to. The question text tells both models to treat the submission as untrusted evidence.
Three forms ship in the registry. /leads routes among startup, growth, and enterprise destinations plus sales triage. /contact routes among billing, support, general inquiries, and contact triage. /issues routes among frontend, platform, infrastructure, identity, and engineering triage. Each form has three samples: a clear request, overlapping needs, and limited context. Loading a sample still calls the models.
Email is optional, through Resend. Every destination on a form needs an inbox in lib/recipients.ts before the checkbox appears. Those addresses stay in a server-only module and are not sent to either model. A failed send leaves the routing result in place. Resend returning a message id means the send was accepted, which is short of inbox delivery.
pnpm test uses mocked models and a mocked Resend. The suite checks the threshold, missing metadata, and that Luna’s prompt does not contain Jev’s answer. The guide says the 0.95 line is a starting point and that a team should measure it on labeled submissions before relying on it. The template does not publish that measurement.
We did not deploy the app or submit a form.
This site's reading
Editorial notes evaluating claims against primary sources, contextualizing findings alongside related implementations, and defining technical terms.
Verify
The September 21 post from @aisdk points at the Vercel guide by Ben Sabic, published the same day, and at github.com/vercel-labs/jev-ai-sdk-form-router. The repo is MIT, copyright 2026 Vercel, Inc. Routing uses AI SDK experimental_evaluate on typesafe-ai/jev through AI Gateway. The app accepts the destination when providerMetadata.typesafe.confidence for that question is a number from 0 to 1 and is at least 0.95, compared unrounded, so 0.94999 falls back. Confidence is separate from the probability of the selected option. A test accepts confidence 0.96 with selected probability 0.7. Otherwise, or on error or a 12-second timeout, generateText with Output.object asks openai/gpt-5.6-luna-fast, reasoning low, 25-second timeout, max 1,000 output tokens. The fallback prompt is the questions and state only. fallbackReason is null, low-confidence, missing-confidence, or jev-error. A failed fallback returns no destination. Three forms, /leads, /contact, and /issues, each include a triage destination. Zod strips unregistered fields, including a client-supplied destination or to address. Appended instructions tell both models to treat submission fields as untrusted evidence. Optional email uses Resend. Recipient addresses stay in a server-only module. Vitest mocks both models and Resend. The guide says Jev is free on AI Gateway until September 25, 2026. We did not deploy the template or submit a form.
Compare
n8n-nodes-jev-classification sends low-confidence items to Needs Review at a default of 0.5. LiteLLM's compaction guardrail drops tool results below 0.2. jevctl compact keeps lines at 0.5. This template's gate is 0.95 on TypeSafe's confidence metadata for a Choice, and the other model is a generator that does not see Jev's pick. Netlify's September 17 sample routes a contact form among sales, support, and spam without a published numeric gate. TypeSafe's jaggedness page says not to reuse a Noul threshold on a Choice.
Terms
- confidence statistic
- TypeSafe metadata on a Jev Choice, keyed by question id. The form router reads it from providerMetadata.typesafe.confidence. It runs from 0 when probability is spread across destinations to 1 when it sits on one destination, and it is not the probability of the selected option.
- fallbackReason
- The form router's label for why Luna decided. null when Jev cleared 0.95. low-confidence, missing-confidence, or jev-error otherwise. A failed Luna call does not return a reason or a destination.