New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@tanstack/ai-vercel-gateway

Package Overview
Dependencies
Maintainers
3
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/ai-vercel-gateway

Vercel AI Gateway adapter for TanStack AI chat, embeddings, and image generation.

latest
Source
npmnpm
Version
0.3.9
Version published
Weekly downloads
2.3K
-33.28%
Maintainers
3
Weekly downloads
 
Created
Source
TanStack AI

@tanstack/ai-vercel-gateway

Vercel AI Gateway adapter for TanStack AI.

Installation

npm install @tanstack/ai-vercel-gateway

Auth

Set AI_GATEWAY_API_KEY. If that key is not set, the adapter uses VERCEL_OIDC_TOKEN.

export AI_GATEWAY_API_KEY="..."

You can also pass the key to a create* factory.

Usage

import { chat } from '@tanstack/ai'
import { vercelGatewayText } from '@tanstack/ai-vercel-gateway'

const adapter = vercelGatewayText('anthropic/claude-opus-5')

const stream = chat({
  adapter,
  messages: [{ role: 'user', content: 'Hello' }],
})

The default text adapter uses the Responses API. Pass { api: 'chat' } for Chat Completions.

See docs/adapters/vercel-gateway.md for chat, summarize, embeddings, image generation, and gateway routing.

Keywords

ai

FAQs

Package last updated on 09 Oct 2026

Related posts