Using Jev in TanStack Start with TanStack AI
A technical article showing how to call TypeSafe.ai's Jev decision model from a TanStack Start server route through TanStack AI's Vercel AI Gateway adapter to build a typed routing endpoint.
This article walks through wiring TypeSafe.ai's Jev decision model into a TanStack Start application using TanStack AI. A server route calls TanStack AI's decide function, which is sent through the Vercel AI Gateway adapter to Vercel's AI Gateway, and returns a typed decision that the interface can display or the application can act on.
The worked example is a support-ticket router: the route supplies a customer message as evidence along with the destinations to choose between, such as billing, technical support, or manual review for unclear cases, and Jev selects among the supplied options rather than freely generating an answer. The Vercel Gateway adapter exposes a helper for evaluation with an explicit credential, paired with the decide call and the Jev model identifier.
The piece explains the responsibility of each part of the integration, from TanStack Start receiving the form submission to the application code accepting or requiring review of Jev's proposed answer.