@neondatabase/ai-sdk-provider 0.4.0 → 0.5.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 +3 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +0 -1
- package/dist/package.js +1 -1
- package/package.json +6 -11
- package/dist/v1.d.ts +0 -7
- package/dist/v1.js +0 -7
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ NEON_AI_GATEWAY_TOKEN="nt_live_..."
|
|
|
24
24
|
## Usage
|
|
25
25
|
|
|
26
26
|
```ts
|
|
27
|
-
import { neon } from "@neondatabase/ai-sdk-provider
|
|
27
|
+
import { neon } from "@neondatabase/ai-sdk-provider";
|
|
28
28
|
import { generateText } from "ai";
|
|
29
29
|
|
|
30
30
|
// Reads NEON_AI_GATEWAY_BASE_URL + NEON_AI_GATEWAY_TOKEN from the environment.
|
|
@@ -37,7 +37,7 @@ const { text } = await generateText({
|
|
|
37
37
|
Or configure explicitly with `createNeon`:
|
|
38
38
|
|
|
39
39
|
```ts
|
|
40
|
-
import { createNeon } from "@neondatabase/ai-sdk-provider
|
|
40
|
+
import { createNeon } from "@neondatabase/ai-sdk-provider";
|
|
41
41
|
|
|
42
42
|
const neon = createNeon({
|
|
43
43
|
baseURL: process.env.NEON_AI_GATEWAY_BASE_URL,
|
|
@@ -67,7 +67,7 @@ Available on OpenAI models via the Responses `image_generation` tool (there is n
|
|
|
67
67
|
|
|
68
68
|
```ts
|
|
69
69
|
import { streamText } from "ai";
|
|
70
|
-
import { neon } from "@neondatabase/ai-sdk-provider
|
|
70
|
+
import { neon } from "@neondatabase/ai-sdk-provider";
|
|
71
71
|
|
|
72
72
|
const result = streamText({
|
|
73
73
|
model: neon("gpt-5-mini"),
|
|
@@ -99,7 +99,3 @@ pnpm test:e2e
|
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neondatabase/ai-sdk-provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.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": [
|
|
@@ -58,11 +53,11 @@
|
|
|
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 };
|