Building an Agent with a Built-in Jev Model Router via Vercel AI Gateway

X postRiley BrownTutorial

Riley Brown and Agent Native share a single prompt to generate an AI agent featuring dynamic model routing via Claude or Codex. It uses Jev by typesafe through Vercel's AI Gateway and the eve framework.

Key points

  1. Developers can build an agent with built-in model routing using a single prompt in Codex or Claude.
  2. Routing is powered by Jev from typesafe, available through Vercel's AI Gateway.
  3. Access across all models requires only a single Vercel API key.
  4. The router directs simple queries to low-cost models and complex tasks to frontier models to optimise token spend.
  5. The generated application visualises inline which model Jev selects and why the choice was made.

Why it matters

Dynamic model routing reduces inference costs by avoiding unnecessary frontier model calls for simple tasks. Combining this with a unified gateway simplifies API key management and provider integration.

Analysis

This workflow abstracts provider complexity by relying on Jev for routing logic and Vercel AI Gateway for model access. While this speeds up rapid agent prototyping, real-world implementations need to balance routing overhead against potential provider latency.

Original post

Riley Brown

@rileybrown · 17 September 2026

In one prompt you can build an agent, with every model, with a built in model router powered by Jev. All you need is a vercel api key. (Vercel Gateway has Jev). Just ask codex or claude to build it full prompt in the post below ⬇️ t.co/rhpck1A0bj

319 likes8 replies498 bookmarks40.7k views

View on X
Selected replies (5)
  • @notjazii @rileybrown hmm gonna play around with jev and let's see what I can cook
  • @digital_founder @rileybrown One prompt, every model, zero idea which one actually did the work
  • @georgehanu @rileybrown This feels like the natural architecture: cheap model decides, specialist model executes, fallback model handles uncertainty. Much better than sending every task to the biggest model by default.
  • @Tacdel0 @rileybrown The local + cloud version of this would be really interesting. Route cheap/simple queries to a local model, scale up locally for medium tasks, then only hit frontier APIs when the router actually needs them. Curious how well Jev handles that boundary in practice.
  • @MichaelMakelko @rileybrown I tried the planning/execution split in Codex: routing each phase separately made retries easier to isolate and cut blind re-runs.

Summary generated by AI (Gemini 3.8 Flash, 27 September 2026). It may contain errors – the original source is authoritative.

Similar in content, found by the AI search.

  • X post:Guillermo Rauch

    Jev Becomes Fastest-Adopted Model in Vercel AI Gateway History

    Guillermo Rauch and Vercel reported that Jev, a probabilistic decision model by TypeSafe AI, saw record-breaking adoption on Vercel AI Gateway, reaching approximately 13% of paid teams within 24 hours.

    303bookmarks123.5kviews

    AI & LLMs· News

  • X post:Ruben Hassid

    TypeSafe's Jev: Ultra-Fast AI Classification Without Chatbot Latency

    Ruben Hassid highlights Jev by TypeSafe as a fast, low-cost decision engine designed to bypass standard LLM text generation. Rather than generating word-by-word paragraphs, Jev answers predefined multiple-choice questions with a direct decision and confidence score. Hassid details how to integrate it into Claude Code and Codex for tasks like bulk contact classification.

    1.6kbookmarks112.5kviews

    AI & LLMs· Tool

  • Article:vercel.com

    Jev Breaks Adoption Records on Vercel AI Gateway

    TypeSafe AI's Jev model has become the fastest-adopted model in Vercel AI Gateway history, reaching nearly 13% of paid teams within its first 24 hours.

    AI & LLMs· Announcement

  • X post:Riley Brown

    Connecting Claude Code to GrokBot via Webhook

    Riley Brown shares a setup guide from Agent Native demonstrating how to connect Claude Code to GrokBot using a webhook.

    232bookmarks11.7kviews

    AI & LLMs· Resource

  • Repository:vercel/ai

    Vercel AI SDK: Provider-Agnostic TypeScript Toolkit for AI Applications and Agents

    Vercel's AI SDK is an open-source TypeScript library for developing AI-powered applications and agents. It provides a unified API across diverse model providers including OpenAI, Anthropic, and Google, and integrates directly with frameworks such as Next.js, React, Svelte, Vue, and Angular.

    26.6kstarsTypeScript

    AI & LLMs· Tool

Let's talk about your project

Locations

  • Mattersburg
    Johann Nepomuk Bergerstraße 7/2/14
    7210 Mattersburg, Austria
  • Vienna
    Ungargasse 64-66/3/404
    1030 Wien, Austria

Parts of this content were created with the assistance of AI.