@@ -181,3 +181,3 @@ "use strict"; | ||
| // src/version.ts | ||
| var VERSION = true ? "5.0.156" : "0.0.0-test"; | ||
| var VERSION = true ? "5.0.157" : "0.0.0-test"; | ||
@@ -184,0 +184,0 @@ // src/util/download/download.ts |
@@ -161,3 +161,3 @@ // internal/index.ts | ||
| // src/version.ts | ||
| var VERSION = true ? "5.0.156" : "0.0.0-test"; | ||
| var VERSION = true ? "5.0.157" : "0.0.0-test"; | ||
@@ -164,0 +164,0 @@ // src/util/download/download.ts |
+11
-4
| { | ||
| "name": "ai", | ||
| "version": "5.0.156", | ||
| "version": "5.0.157", | ||
| "description": "AI SDK by Vercel - The AI Toolkit for TypeScript and JavaScript", | ||
@@ -38,3 +38,3 @@ "license": "Apache-2.0", | ||
| "@opentelemetry/api": "1.9.0", | ||
| "@ai-sdk/gateway": "2.0.60", | ||
| "@ai-sdk/gateway": "2.0.61", | ||
| "@ai-sdk/provider": "2.0.1", | ||
@@ -78,2 +78,3 @@ "@ai-sdk/provider-utils": "3.0.22" | ||
| "sdk", | ||
| "llm", | ||
| "mcp", | ||
@@ -86,8 +87,14 @@ "tool-calling", | ||
| "generative", | ||
| "genai", | ||
| "chatbot", | ||
| "prompt", | ||
| "inference", | ||
| "llm", | ||
| "language-model", | ||
| "streaming" | ||
| "streaming", | ||
| "openai", | ||
| "anthropic", | ||
| "claude", | ||
| "gemini", | ||
| "xai", | ||
| "grok" | ||
| ], | ||
@@ -94,0 +101,0 @@ "scripts": { |
+21
-13
@@ -21,2 +21,13 @@  | ||
| By default, the AI SDK uses the [Vercel AI Gateway](https://vercel.com/docs/ai-gateway) to give you access to all major providers out of the box. Just pass a model string for any supported model: | ||
| ```ts | ||
| const result = await generateText({ | ||
| model: 'anthropic/claude-opus-4.6', // or 'openai/gpt-5.4', 'google/gemini-3-flash', etc. | ||
| prompt: 'Hello!', | ||
| }); | ||
| ``` | ||
| You can also connect to providers directly using their SDK packages: | ||
| ```shell | ||
@@ -26,4 +37,11 @@ npm install @ai-sdk/openai @ai-sdk/anthropic @ai-sdk/google | ||
| Alternatively you can use the [Vercel AI Gateway](https://vercel.com/docs/ai-gateway). | ||
| ```ts | ||
| import { anthropic } from '@ai-sdk/anthropic'; | ||
| const result = await generateText({ | ||
| model: anthropic('claude-opus-4-6'), // or openai('gpt-5.4'), google('gemini-3-flash'), etc. | ||
| prompt: 'Hello!', | ||
| }); | ||
| ``` | ||
| ## Usage | ||
@@ -37,3 +55,3 @@ | ||
| const { text } = await generateText({ | ||
| model: 'openai/gpt-5', // use Vercel AI Gateway | ||
| model: 'openai/gpt-5.4', // use Vercel AI Gateway | ||
| prompt: 'What is an agent?', | ||
@@ -43,12 +61,2 @@ }); | ||
| ```ts | ||
| import { generateText } from 'ai'; | ||
| import { openai } from '@ai-sdk/openai'; | ||
| const { text } = await generateText({ | ||
| model: openai('gpt-5'), // use OpenAI Responses API directly | ||
| prompt: 'What is an agent?', | ||
| }); | ||
| ``` | ||
| ### Generating Structured Data | ||
@@ -61,3 +69,3 @@ | ||
| const { object } = await generateObject({ | ||
| model: 'openai/gpt-5', | ||
| model: 'openai/gpt-5.4', | ||
| schema: z.object({ | ||
@@ -64,0 +72,0 @@ recipe: z.object({ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
2833788
0.02%167
5.03%+ Added
- Removed
Updated