@neon/ai-sdk-provider has 1,198 recorded weekly downloads on npm, an increase of 133% over the past 30 days, ranking #1414 of 2,322 tracked listings.
About @neon/ai-sdk-provider
@neon/ai-sdk-provider
Community Vercel AI SDK provider for the Neon AI Gateway. Supports AI SDK v6 and v7 (ai@^6 or ai@^7).
The Neon AI Gateway is branch-scoped: each Neon project branch gets its own gateway host, and a platform token authorizes requests for that branch. Use the same neon(modelId) API across the branch's text models; the provider selects Anthropic Messages, OpenAI Responses, or Chat Completions for each model. Embedding models use neon.embeddingModel(modelId).
Use canonical model ids such as gpt-5-mini, llama-4-maverick, and gemini-3-flash, matching neon.com/models. The typed catalog includes the known model ids, and arbitrary strings are accepted so newly available models work before the types update.
Install
npm install @neon/ai-sdk-provider ai
Requirements: Node.js >= 20.19 with AI SDK 6. AI SDK 7 itself requires Node.js >= 22.
Configuration
The gateway URL is branch-scoped, so both values come from the Neon Console (your project → a branch → AI Gateway tab), or from neon env pull / neon dev:
NEON_AI_GATEWAY_BASE_URL="https://<branch-id>-api.ai.<region>.aws.neon.tech"
NEON_AI_GATEWAY_TOKEN="nt_live_..."
Usage
import { neon } from "@neon/ai-sdk-provider";
import { generateText } from "ai";
// Reads NEON_AI_GATEWAY_BASE_URL + NEON_AI_GATEWAY_TOKEN from the environment.
const { text } = await generateText({
model: neon("gpt-5-mini"), // or "llama-4-maverick", "gemini-3-flash", …
prompt: "Summarize Postgres for me.",
});
Or configure explicitly with createNeon:
import { createNeon } from "@neon/ai-sdk-provider";
const neon = createNeon({
baseURL: process.env.NEON_AI_GATEWAY_BASE_URL,
apiKey: process.env.NEON_AI_GATEWAY_TOKEN,
});
Routing
| Model family | Endpoint | Why |
|---|---|---|
Anthropic (claude-*) | Messages API | Anthropic tools, structured output, and reasoning |
OpenAI (gpt-*, *-codex) | Responses API | Codex, reasoning, and built-in tools such as image generation |
| Everything else (Gemini, Llama, Qwen, gpt-oss, ...) | Chat Completions API | one streaming interface across the remaining model families |
Routing matches on the model id.
Capabilities
generateText and streamText work with any text model available to your branch. generateObject, streamObject, and single- or multi-step tool calls work with OpenAI (including Codex), Meta, Alibaba, Zhipu AI, and Thinking Machines models. Gemini currently supports generateText and streamText; structured output and multi-step tools are not supported. Vision input works on models that accept images.
Claude models use the Messages API. On both that route and Chat Completions the provider removes call options the gateway rejects and reports each one in result.warnings instead of failing the request — see Dropped call options. Unsupported Responses API storage options throw before a request is sent — see Errors.
Which ids your branch serves is account-specific during the beta; GET $NEON_AI_GATEWAY_BASE_URL/v1/models is the authoritative list. NeonChatModelId accepts any string, so an id this package has not caught up with still works — and, equally, an id the gateway has retired still type-checks and fails at the gateway instead.
Dropped call options
Upstream backends behind the gateway accept different subsets of the OpenAI-style parameters the AI SDK emits, and sending one an upstream rejects is a hard 400. The provider drops those before the request and records a warning in result.warnings, so a call succeeds instead of failing on a parameter you passed in good faith.
These rules apply on the Anthropic Messages and Chat Completions routes. The Responses route (every gpt-* id) relies on the upstream OpenAI model's own stripping instead, so its behaviour and its warning wording are the AI SDK's rather than described here — but getNeonModelCapabilities still answers for those ids, and the gpt-5 row below is what it reports rather than something this provider drops.
| Models | Dropped |
|---|---|
Claude 4.7 and newer (claude-opus-4-7, claude-opus-4-8, claude-opus-5, claude-sonnet-5, claude-fable-5, claude-fable-5-1) | temperature, topP |
| All Claude | frequencyPenalty, presencePenalty, seed, reasoningEffort, and topP when you set both temperature and topP (Anthropic accepts only one) |
gpt-oss | frequencyPenalty, presencePenalty, seed, stopSequences |
| Qwen, Gemma | frequencyPenalty, presencePenalty, seed |
glm-5-2, glm-5-3-flash, inkling, kimi-k3 | frequencyPenalty, presencePenalty |
| Meta Llama | frequencyPenalty, presencePenalty, seed |
gemini-3-5-flash-lite | frequencyPenalty, presencePenalty |
gemini-3-6-flash | temperature, topP, frequencyPenalty, presencePenalty |
| Every other Gemini | nothing |
gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-5-pro (reported only — Responses strips these upstream) | temperature, topP |
temperature on a Claude 5 model therefore has no effect. That is the gateway's behaviour, not a provider choice; sending it returns does not support the temperature parameter. Steer those models with Anthropic's own effort control instead — note that this is effort, not the OpenAI-style reasoningEffort, which every Claude id drops:
await generateText({
model: neon('claude-opus-5'),
prompt: 'Plan a schema migration.',
providerOptions: { anthropic: { effort: 'high' } }, // low | medium | high | xhigh | max
});
Query the rules directly rather than hardcoding them:
import { getNeonModelCapabilities } from '@neon/ai-sdk-provider';…
Description from the npm listing.
- neon
- ai
- ai-sdk
- vercel-ai-sdk
- provider
- ai-gateway
- llm
- platform
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
7/30/90-day growth
Ranking history
Listing placement
Listing placement
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 (122)Similar npm AI SDKs plugins
All 20 @neon/ai-sdk-provider alternativesData 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/@neon/ai-sdk-provider. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.