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

@tanstack/ai-vercel-gateway

Package Overview
Dependencies
Maintainers
3
Versions
30
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.

Source
npmnpm
Version
0.2.16
Version published
Maintainers
3
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 21 Sep 2026

Related posts