@neondatabase/ai-sdk-provider 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @neondatabase/ai-sdk-provider
1
+ # @neon/ai-sdk-provider
2
2
 
3
3
  Community [Vercel AI SDK](https://ai-sdk.dev) provider for the [Neon](https://neon.com) AI Gateway. Requires **AI SDK v6** (`ai@^6`).
4
4
 
@@ -9,12 +9,14 @@ Model ids use the canonical Neon (unprefixed) form — `claude-sonnet-4-6`, `gpt
9
9
  ## Install
10
10
 
11
11
  ```bash
12
- npm install @neondatabase/ai-sdk-provider ai@^6
12
+ npm install @neon/ai-sdk-provider ai@^6
13
13
  ```
14
14
 
15
+ > **Requirements:** Node.js >= 20.19.
16
+
15
17
  ## Configuration
16
18
 
17
- The gateway URL is branch-scoped, so both values come from the Neon Console (your project → a branch → **AI Gateway** tab), or from `neonctl env pull` / `neon dev`:
19
+ 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`:
18
20
 
19
21
  ```bash
20
22
  NEON_AI_GATEWAY_BASE_URL="https://<branch-id>-api.ai.<region>.aws.neon.tech"
@@ -24,7 +26,7 @@ NEON_AI_GATEWAY_TOKEN="nt_live_..."
24
26
  ## Usage
25
27
 
26
28
  ```ts
27
- import { neon } from "@neondatabase/ai-sdk-provider/v1";
29
+ import { neon } from "@neon/ai-sdk-provider";
28
30
  import { generateText } from "ai";
29
31
 
30
32
  // Reads NEON_AI_GATEWAY_BASE_URL + NEON_AI_GATEWAY_TOKEN from the environment.
@@ -37,7 +39,7 @@ const { text } = await generateText({
37
39
  Or configure explicitly with `createNeon`:
38
40
 
39
41
  ```ts
40
- import { createNeon } from "@neondatabase/ai-sdk-provider/v1";
42
+ import { createNeon } from "@neon/ai-sdk-provider";
41
43
 
42
44
  const neon = createNeon({
43
45
  baseURL: process.env.NEON_AI_GATEWAY_BASE_URL,
@@ -67,7 +69,7 @@ Available on OpenAI models via the Responses `image_generation` tool (there is n
67
69
 
68
70
  ```ts
69
71
  import { streamText } from "ai";
70
- import { neon } from "@neondatabase/ai-sdk-provider/v1";
72
+ import { neon } from "@neon/ai-sdk-provider";
71
73
 
72
74
  const result = streamText({
73
75
  model: neon("gpt-5-mini"),
@@ -94,12 +96,8 @@ for await (const part of result.fullStream) {
94
96
  Against a live branch with AI Gateway enabled:
95
97
 
96
98
  ```bash
97
- cp .env.example .env # fill NEON_AI_GATEWAY_BASE_URL + NEON_AI_GATEWAY_TOKEN from `neonctl env pull`
99
+ cp .env.example .env # fill NEON_AI_GATEWAY_BASE_URL + NEON_AI_GATEWAY_TOKEN from `neon env pull`
98
100
  pnpm test:e2e
99
101
  ```
100
102
 
101
103
  The matrix covers one models.dev `neon` model per family (Anthropic, OpenAI, Codex, Gemini, Meta) across `generateText`, `streamText`, `generateObject`, tool calling, and `neon.tools.imageGeneration`. Skipped when gateway env vars are absent.
102
-
103
- ## Versioning
104
-
105
- Import from `@neondatabase/ai-sdk-provider/v1` to pin to a specific major. The default entry re-exports the latest stable version.
package/dist/index.d.ts CHANGED
@@ -4,4 +4,4 @@ import { NEON_EXTRA_MODEL_IDS, NEON_MODELS_DEV_IDS, NeonChatModelId, NeonKnownMo
4
4
  import { NeonModelCapabilities, NeonModelFamily, NeonModelRoute, getNeonModelCapabilities, getNeonModelRoute } from "./lib/neon-model-capabilities.js";
5
5
  import { NeonResponsesLanguageModel } from "./lib/neon-responses-language-model.js";
6
6
  import { NeonErrorData, NeonProvider, NeonProviderSettings, createNeon, neon } from "./lib/provider.js";
7
- export { NEON_EXTRA_MODEL_IDS, NEON_MODELS_DEV_IDS, NeonAnthropicLanguageModel, NeonChatLanguageModel, NeonChatModelId, NeonErrorData, NeonKnownModelId, NeonModelCapabilities, NeonModelFamily, NeonModelRoute, NeonProvider, NeonProviderSettings, NeonResponsesLanguageModel, createNeon, getNeonModelCapabilities, getNeonModelRoute, neon };
7
+ export { NEON_EXTRA_MODEL_IDS, NEON_MODELS_DEV_IDS, NeonAnthropicLanguageModel, NeonChatLanguageModel, type NeonChatModelId, type NeonErrorData, type NeonKnownModelId, type NeonModelCapabilities, type NeonModelFamily, type NeonModelRoute, type NeonProvider, type NeonProviderSettings, NeonResponsesLanguageModel, createNeon, getNeonModelCapabilities, getNeonModelRoute, neon };
package/dist/index.js CHANGED
@@ -4,5 +4,4 @@ import { NeonChatLanguageModel } from "./lib/neon-chat-language-model.js";
4
4
  import { NEON_EXTRA_MODEL_IDS, NEON_MODELS_DEV_IDS } from "./lib/neon-chat-options.js";
5
5
  import { NeonResponsesLanguageModel } from "./lib/neon-responses-language-model.js";
6
6
  import { createNeon, neon } from "./lib/provider.js";
7
- import "./v1.js";
8
7
  export { NEON_EXTRA_MODEL_IDS, NEON_MODELS_DEV_IDS, NeonAnthropicLanguageModel, NeonChatLanguageModel, NeonResponsesLanguageModel, createNeon, getNeonModelCapabilities, getNeonModelRoute, neon };
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "0.4.0";
2
+ var version = "0.6.0";
3
3
  //#endregion
4
4
  export { version };
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neondatabase/ai-sdk-provider",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Community Vercel AI SDK provider for the Neon AI Gateway.",
5
5
  "keywords": [
6
6
  "neon",
@@ -29,11 +29,6 @@
29
29
  "types": "./dist/index.d.ts",
30
30
  "import": "./dist/index.js",
31
31
  "default": "./dist/index.js"
32
- },
33
- "./v1": {
34
- "types": "./dist/v1.d.ts",
35
- "import": "./dist/v1.js",
36
- "default": "./dist/v1.js"
37
32
  }
38
33
  },
39
34
  "files": [
@@ -52,17 +47,17 @@
52
47
  "zod": "^4.4.3"
53
48
  },
54
49
  "engines": {
55
- "node": ">=22"
50
+ "node": ">=20.19.0"
56
51
  },
57
52
  "publishConfig": {
58
53
  "provenance": false
59
54
  },
60
55
  "dependencies": {
61
- "@ai-sdk/anthropic": "3.0.82",
62
- "@ai-sdk/openai": "3.0.69",
63
- "@ai-sdk/openai-compatible": "2.0.48",
64
- "@ai-sdk/provider": "3.0.10",
65
- "@ai-sdk/provider-utils": "4.0.27"
56
+ "@ai-sdk/anthropic": "^3.0.82",
57
+ "@ai-sdk/openai": "^3.0.69",
58
+ "@ai-sdk/openai-compatible": "^2.0.48",
59
+ "@ai-sdk/provider": "^3.0.10",
60
+ "@ai-sdk/provider-utils": "^4.0.27"
66
61
  },
67
62
  "peerDependencies": {
68
63
  "ai": "^6.0.0",
package/dist/v1.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import { NeonAnthropicLanguageModel } from "./lib/neon-anthropic-language-model.js";
2
- import { NeonChatLanguageModel } from "./lib/neon-chat-language-model.js";
3
- import { NEON_EXTRA_MODEL_IDS, NEON_MODELS_DEV_IDS, NeonChatModelId, NeonKnownModelId } from "./lib/neon-chat-options.js";
4
- import { NeonModelCapabilities, NeonModelFamily, NeonModelRoute, getNeonModelCapabilities, getNeonModelRoute } from "./lib/neon-model-capabilities.js";
5
- import { NeonResponsesLanguageModel } from "./lib/neon-responses-language-model.js";
6
- import { NeonErrorData, NeonProvider, NeonProviderSettings, createNeon, neon } from "./lib/provider.js";
7
- export { NEON_EXTRA_MODEL_IDS, NEON_MODELS_DEV_IDS, NeonAnthropicLanguageModel, NeonChatLanguageModel, type NeonChatModelId, type NeonErrorData, type NeonKnownModelId, type NeonModelCapabilities, type NeonModelFamily, type NeonModelRoute, type NeonProvider, type NeonProviderSettings, NeonResponsesLanguageModel, createNeon, getNeonModelCapabilities, getNeonModelRoute, neon };
package/dist/v1.js DELETED
@@ -1,7 +0,0 @@
1
- import { NeonAnthropicLanguageModel } from "./lib/neon-anthropic-language-model.js";
2
- import { getNeonModelCapabilities, getNeonModelRoute } from "./lib/neon-model-capabilities.js";
3
- import { NeonChatLanguageModel } from "./lib/neon-chat-language-model.js";
4
- import { NEON_EXTRA_MODEL_IDS, NEON_MODELS_DEV_IDS } from "./lib/neon-chat-options.js";
5
- import { NeonResponsesLanguageModel } from "./lib/neon-responses-language-model.js";
6
- import { createNeon, neon } from "./lib/provider.js";
7
- export { NEON_EXTRA_MODEL_IDS, NEON_MODELS_DEV_IDS, NeonAnthropicLanguageModel, NeonChatLanguageModel, NeonResponsesLanguageModel, createNeon, getNeonModelCapabilities, getNeonModelRoute, neon };