JevMade hello@JevMade.com
← Back to guides

JevMade field notes / Full-stack tutorial

Using Jev in TanStack Start with TanStack AI

A full TanStack Start ticket-routing implementation using TanStack AI's decide(), Vercel Gateway authentication, per-request OIDC resolution, Zod input validation, an explicit selected-probability review rule, differentiated HTTP errors, and UI handling.

Original by Ben SabicIntegrationsVercel explainerSource reviewed

Before you dive in

What you’ll find in the original

  1. Resolve Gateway credentials in the server request and keep them out of the browser; direct TypeSafe credentials are not required for this adapter path.
  2. Read result.queue.value as the selected option and result.queue.probability as that option's probability, preserving both the proposed queue and the application's final destination when review overrides it.
  3. Return malformed input as 400 and provider failure as 503, but treat a completed low-probability decision requiring review as a successful evaluation rather than a transport failure.
Worth knowing

The 0.85 selected-option probability cutoff and ten-second deadline are application examples, not universal defaults. Choice confidence is a separate distribution-concentration statistic and is not used by this routing rule. Vercel's metadata names Ben Sabic as author and exposes no publication date.