Skip to content
PluginStats

@tanstack/ai-llmgateway weekly downloads statistics

By tanstack (53 listings) · npm · AI SDKs

LLM Gateway adapter for TanStack AI — one OpenAI-compatible endpoint for chat, tool calling, and structured outputs across many providers and models.

View on npm Outdated · Nov 18, 2026

@tanstack/ai-llmgateway has 325 recorded weekly downloads on npm, a decrease of 45.9% over the past 30 days, ranking #2362 of 3,247 tracked listings.

Weekly downloads
325
Official API · Dec 5, 2026
7-day growth
-12.6%
-47 weekly downloads
30-day growth
-45.9%
-276 weekly downloads
90-day growth
+232%
+227 weekly downloads
Rank
#2362
▼ 131 in 7 days

About @tanstack/ai-llmgateway

<div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://tanstack.com/api/readme/ai.png?theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://tanstack.com/api/readme/ai.png" /> <img src="https://tanstack.com/api/readme/ai.png" alt="TanStack AI" width="900" /> </picture> </div> <br />

@tanstack/ai-llmgateway

LLM Gateway adapter for TanStack AI — one OpenAI-compatible endpoint that routes chat, tool calling, and structured outputs to hundreds of models across many providers.

Installation

npm install @tanstack/ai-llmgateway
# or
pnpm add @tanstack/ai-llmgateway
# or
yarn add @tanstack/ai-llmgateway

Setup

Get your API key from the LLM Gateway dashboard and set it as an environment variable:

export LLM_GATEWAY_API_KEY="llmgtwy_..."

Usage

Text/Chat Adapter
import { llmGatewayText } from '@tanstack/ai-llmgateway'
import { chat } from '@tanstack/ai'

const stream = chat({
  adapter: llmGatewayText('gpt-5.6-terra'),
  messages: [
    { role: 'user', content: 'Explain quantum computing in simple terms' },
  ],
  threadId: 'thread-1',
})
With Explicit API Key
import { createLLMGatewayText } from '@tanstack/ai-llmgateway'

const adapter = createLLMGatewayText('gpt-5.6-terra', 'llmgtwy_api_key')
Self-Hosted Gateways

LLM Gateway is open source and self-hostable — point baseURL at your own deployment:

import { createLLMGatewayText } from '@tanstack/ai-llmgateway'

const adapter = createLLMGatewayText('gpt-5.6-terra', 'llmgtwy_api_key', {
  baseURL: 'https://gateway.example.com/v1',
})

Models

Any model listed on llmgateway.io/models works — pass its id as the model name. A curated set of flagship models additionally carries per-model type metadata (input modalities, provider options) with autocomplete, including gpt-5.6-terra, claude-sonnet-5, gemini-pro-latest, kimi-k3, glm-5.2, deepseek-v4-pro, and more (see LLMGATEWAY_CHAT_MODELS).

Model ids accept an optional provider/ prefix to pin routing to a specific provider:

import { llmGatewayText } from '@tanstack/ai-llmgateway'

llmGatewayText('kimi-k3') // gateway picks the best available provider
llmGatewayText('moonshot/kimi-k3') // always routed to Moonshot

Features

  • ✅ Streaming chat completions
  • ✅ Structured output (JSON Schema)
  • ✅ Function/tool calling
  • ✅ Multimodal input (text + images for vision models)
  • ✅ Reasoning output (reasoning_content deltas from reasoning models)
  • ✅ Summarization (llmGatewaySummarize)

Tree-Shakeable Adapters

This package uses tree-shakeable adapters, so you only import what you need:

// Text/chat only
import { llmGatewayText } from '@tanstack/ai-llmgateway'

// Summarization only
import { llmGatewaySummarize } from '@tanstack/ai-llmgateway'

Documentation

Description from the npm listing.

  • ai
  • ai-sdk
  • typescript
  • tanstack
  • llmgateway
  • llm-gateway
  • adapter
  • llm
  • gateway
  • chat
  • streaming
  • tool-calling
  • structured-outputs
  • model-router

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@tanstack/ai-llmgateway weekly downloads on npm, last 90 days: 325 weekly downloads as of Dec 5, 2026, +232% over 90 days.@tanstack/ai-llmgatewayWeekly downloads on npm · Last 90 days325downloads / week+232% over 90 days02004006008001K1.2K1.4K1.6K1.8KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@tanstack/ai-llmgateway weekly downloads on npm, last 90 days: 325 weekly downloads as of Dec 5, 2026, +232% over 90 days.

7/30/90-day growth

@tanstack/ai-llmgateway weekly downloads growth on npm: -12.6% over 7 days, -45.9% over 30 days, +232% over 90 days.@tanstack/ai-llmgatewayWeekly downloads growth on npm325downloads / week now7-day growth-47 weekly downloads-12.6%30-day growth-276 weekly downloads-45.9%90-day growth+227 weekly downloads+232%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@tanstack/ai-llmgateway weekly downloads growth on npm: -12.6% over 7 days, -45.9% over 30 days, +232% over 90 days.

Ranking history

@tanstack/ai-llmgateway npm ranking history: currently #2362 (by weekly downloads).@tanstack/ai-llmgatewaynpm ranking · by weekly downloads · Last 90 days#2362current rank#1400#1600#1800#2000#2200#2400Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 30 observations · Updated Dec 5, 2026pluginstats.com
@tanstack/ai-llmgateway npm ranking history: currently #2362 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 119, #2 (overall #2,362)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs378 listings · 19 pages · page 15, #2 (overall #282)
AI SDKs: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for @tanstack/ai-llmgateway
Date (UTC)Weekly downloadsChange vs. previous
325-29
354+8
346-14
360-6
366+21
345-16
361-11
372-77
449+24
425+42
383+17
366+26
340-15
355—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@tanstack/ai-llmgateway. First seen Oct 16, 2026; last successful collection Nov 18, 2026. See the methodology.