Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Next.js 16 starter with three forms that route submissions to the right team using Jev, with a GPT fallback model for low-confidence cases.

A free Next.js, Tailwind CSS and React Intl dashboard starter with internationalized routing and a Localizely translation workflow.

Next.js starter template with Lucia session auth, email verification, password reset, Drizzle ORM, tRPC, Stripe subscriptions and Playwright E2E tests.
Jev x AI SDK Form Router is a Next.js 16 starter template from Vercel Labs that takes a form submission, evaluates its context with the Jev model (typesafe-ai/jev), and routes it to a matching team or specialty, falling back to openai/gpt-5.6-luna-fast when confidence is low.
Jev x AI SDK Form Router is an open-source Next.js application template that classifies form submissions and sends each one to the correct internal destination. It runs on Next.js 16 and React 19 with the App Router and Server Actions, shipped by Vercel Labs. Submissions enter through one of three forms — Lead, Contact, or Issue Report — and come back out as a routing decision with the destination, the model that decided it, Jev confidence statistics, model timings, and an optional email preview.
experimental_evaluate; the app accepts its choice only when confidence is at least 95%, otherwise openai/gpt-5.6-luna-fast re-evaluates the same criteria with generateText and Output.object, and its choice becomes final./leads routes to startup, growth, enterprise, or sales teams; Contact at /contact routes to billing, support, or general inquiries; Issue Report at /issues routes to frontend, platform, infrastructure, identity, or engineering teams.lib/examples.ts before any model call is made.After Zod validates the submission, Jev evaluates it and selects an allowed team/specialty combination. The 95% threshold uses the unrounded value of providerMetadata.typesafe.confidence.destination, not Jev's displayed selected-option probability, and Jev's statistics stay attached to its original evaluation even when the fallback model makes the final call.
lib/router.ts.lib/examples.ts to change form fields, samples, destinations, and routing criteria.lib/recipients.ts, set RESEND_FROM on a verified domain, and an "Email the receiving team" checkbox appears on the form.lib/router.ts.Node.js 22 or newer and pnpm. Clone the repository, run pnpm install, optionally set AI_GATEWAY_API_KEY in .env.local (or link the project with the Vercel CLI for OIDC), then run pnpm dev and open localhost port 3000, which redirects to /leads.
Yes. Skipping the AI Gateway configuration step lets you explore the forms and load sample inputs, but submitting a form makes live model calls, so no routing result is produced without access to typesafe-ai/jev and openai/gpt-5.6-luna-fast.
The threshold uses the unrounded value of providerMetadata.typesafe.confidence.destination, which is a separate metric from Jev's displayed selected-option probability. If confidence is lower, missing, invalid, or Jev fails outright, the fallback model's decision becomes final.
No. Email delivery is optional, and forms with unconfigured inboxes still show routing results and email previews. Email failures preserve the routing result, and Resend acceptance does not confirm inbox delivery.
lib/examples.ts holds form fields, samples, destinations, and criteria; lib/router.ts holds models, threshold, timeouts, and fallback policy; lib/recipients.ts holds inboxes; lib/submission.ts holds validation and delivery; and the UI lives in components/router-form.tsx, components/routing-result.tsx, and emails/routed-submission.tsx.
