ai 6.0.104 → 6.0.106
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/CHANGELOG.md +15 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/docs/02-getting-started/02-nextjs-app-router.mdx +2 -2
- package/docs/02-getting-started/03-nextjs-pages-router.mdx +2 -2
- package/docs/02-getting-started/04-svelte.mdx +2 -2
- package/docs/02-getting-started/05-nuxt.mdx +2 -2
- package/docs/02-getting-started/06-nodejs.mdx +2 -2
- package/docs/02-getting-started/07-expo.mdx +2 -2
- package/docs/02-getting-started/08-tanstack-start.mdx +2 -2
- package/docs/03-ai-sdk-core/35-image-generation.mdx +3 -3
- package/docs/03-ai-sdk-core/38-video-generation.mdx +1 -1
- package/docs/03-ai-sdk-core/40-middleware.mdx +1 -1
- package/docs/04-ai-sdk-ui/02-chatbot.mdx +1 -1
- package/docs/06-advanced/10-vercel-deployment-guide.mdx +1 -1
- package/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +1 -1
- package/docs/07-reference/03-ai-sdk-rsc/09-use-actions.mdx +1 -1
- package/docs/08-migration-guides/29-migration-guide-4-0.mdx +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 6.0.106
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [29e9f4d]
|
|
8
|
+
- @ai-sdk/gateway@3.0.60
|
|
9
|
+
|
|
10
|
+
## 6.0.105
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [58bc42d]
|
|
15
|
+
- @ai-sdk/provider-utils@4.0.16
|
|
16
|
+
- @ai-sdk/gateway@3.0.59
|
|
17
|
+
|
|
3
18
|
## 6.0.104
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1226,7 +1226,7 @@ var import_provider_utils3 = require("@ai-sdk/provider-utils");
|
|
|
1226
1226
|
var import_provider_utils4 = require("@ai-sdk/provider-utils");
|
|
1227
1227
|
|
|
1228
1228
|
// src/version.ts
|
|
1229
|
-
var VERSION = true ? "6.0.
|
|
1229
|
+
var VERSION = true ? "6.0.106" : "0.0.0-test";
|
|
1230
1230
|
|
|
1231
1231
|
// src/util/download/download.ts
|
|
1232
1232
|
var download = async ({
|
package/dist/index.mjs
CHANGED
|
@@ -1119,7 +1119,7 @@ import {
|
|
|
1119
1119
|
} from "@ai-sdk/provider-utils";
|
|
1120
1120
|
|
|
1121
1121
|
// src/version.ts
|
|
1122
|
-
var VERSION = true ? "6.0.
|
|
1122
|
+
var VERSION = true ? "6.0.106" : "0.0.0-test";
|
|
1123
1123
|
|
|
1124
1124
|
// src/util/download/download.ts
|
|
1125
1125
|
var download = async ({
|
package/dist/internal/index.js
CHANGED
|
@@ -153,7 +153,7 @@ var import_provider_utils2 = require("@ai-sdk/provider-utils");
|
|
|
153
153
|
var import_provider_utils3 = require("@ai-sdk/provider-utils");
|
|
154
154
|
|
|
155
155
|
// src/version.ts
|
|
156
|
-
var VERSION = true ? "6.0.
|
|
156
|
+
var VERSION = true ? "6.0.106" : "0.0.0-test";
|
|
157
157
|
|
|
158
158
|
// src/util/download/download.ts
|
|
159
159
|
var download = async ({
|
package/dist/internal/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ The AI SDK is a powerful TypeScript library designed to help developers build AI
|
|
|
9
9
|
|
|
10
10
|
In this quickstart tutorial, you'll build a simple agent with a streaming chat user interface. Along the way, you'll learn key concepts and techniques that are fundamental to using the AI SDK in your own projects.
|
|
11
11
|
|
|
12
|
-
If you are unfamiliar with the concepts of [Prompt Engineering](/docs/advanced/prompt-engineering) and [HTTP Streaming](/docs/
|
|
12
|
+
If you are unfamiliar with the concepts of [Prompt Engineering](/docs/advanced/prompt-engineering) and [HTTP Streaming](/docs/foundations/streaming), you can optionally read these documents first.
|
|
13
13
|
|
|
14
14
|
## Prerequisites
|
|
15
15
|
|
|
@@ -555,5 +555,5 @@ This simple example demonstrates how tools can expand your model's capabilities.
|
|
|
555
555
|
You've built an AI chatbot using the AI SDK! From here, you have several paths to explore:
|
|
556
556
|
|
|
557
557
|
- To learn more about the AI SDK, read through the [documentation](/docs).
|
|
558
|
-
- If you're interested in diving deeper with guides, check out the [RAG (retrieval-augmented generation)](/
|
|
558
|
+
- If you're interested in diving deeper with guides, check out the [RAG (retrieval-augmented generation)](/cookbook/guides/rag-chatbot) and [multi-modal chatbot](/cookbook/guides/multi-modal-chatbot) guides.
|
|
559
559
|
- To jumpstart your first AI project, explore available [templates](https://vercel.com/templates?type=ai).
|
|
@@ -9,7 +9,7 @@ The AI SDK is a powerful TypeScript library designed to help developers build AI
|
|
|
9
9
|
|
|
10
10
|
In this quickstart tutorial, you'll build a simple agent with a streaming chat user interface. Along the way, you'll learn key concepts and techniques that are fundamental to using the AI SDK in your own projects.
|
|
11
11
|
|
|
12
|
-
If you are unfamiliar with the concepts of [Prompt Engineering](/docs/advanced/prompt-engineering) and [HTTP Streaming](/docs/
|
|
12
|
+
If you are unfamiliar with the concepts of [Prompt Engineering](/docs/advanced/prompt-engineering) and [HTTP Streaming](/docs/foundations/streaming), you can optionally read these documents first.
|
|
13
13
|
|
|
14
14
|
## Prerequisites
|
|
15
15
|
|
|
@@ -538,5 +538,5 @@ This simple example demonstrates how tools can expand your model's capabilities.
|
|
|
538
538
|
You've built an AI chatbot using the AI SDK! From here, you have several paths to explore:
|
|
539
539
|
|
|
540
540
|
- To learn more about the AI SDK, read through the [documentation](/docs).
|
|
541
|
-
- If you're interested in diving deeper with guides, check out the [RAG (retrieval-augmented generation)](/
|
|
541
|
+
- If you're interested in diving deeper with guides, check out the [RAG (retrieval-augmented generation)](/cookbook/guides/rag-chatbot) and [multi-modal chatbot](/cookbook/guides/multi-modal-chatbot) guides.
|
|
542
542
|
- To jumpstart your first AI project, explore available [templates](https://vercel.com/templates?type=ai).
|
|
@@ -9,7 +9,7 @@ The AI SDK is a powerful TypeScript library designed to help developers build AI
|
|
|
9
9
|
|
|
10
10
|
In this quickstart tutorial, you'll build a simple agent with a streaming chat user interface. Along the way, you'll learn key concepts and techniques that are fundamental to using the SDK in your own projects.
|
|
11
11
|
|
|
12
|
-
If you are unfamiliar with the concepts of [Prompt Engineering](/docs/advanced/prompt-engineering) and [HTTP Streaming](/docs/
|
|
12
|
+
If you are unfamiliar with the concepts of [Prompt Engineering](/docs/advanced/prompt-engineering) and [HTTP Streaming](/docs/foundations/streaming), you can optionally read these documents first.
|
|
13
13
|
|
|
14
14
|
## Prerequisites
|
|
15
15
|
|
|
@@ -622,6 +622,6 @@ For most use cases, you probably don't need this behavior -- but if you do, you
|
|
|
622
622
|
You've built an AI chatbot using the AI SDK! From here, you have several paths to explore:
|
|
623
623
|
|
|
624
624
|
- To learn more about the AI SDK, read through the [documentation](/docs).
|
|
625
|
-
- If you're interested in diving deeper with guides, check out the [RAG (retrieval-augmented generation)](/
|
|
625
|
+
- If you're interested in diving deeper with guides, check out the [RAG (retrieval-augmented generation)](/cookbook/guides/rag-chatbot) and [multi-modal chatbot](/cookbook/guides/multi-modal-chatbot) guides.
|
|
626
626
|
- To jumpstart your first AI project, explore available [templates](https://vercel.com/templates?type=ai).
|
|
627
627
|
- To learn more about Svelte, check out the [official documentation](https://svelte.dev/docs/svelte).
|
|
@@ -9,7 +9,7 @@ The AI SDK is a powerful TypeScript library designed to help developers build AI
|
|
|
9
9
|
|
|
10
10
|
In this quickstart tutorial, you'll build a simple agent with a streaming chat user interface. Along the way, you'll learn key concepts and techniques that are fundamental to using the SDK in your own projects.
|
|
11
11
|
|
|
12
|
-
If you are unfamiliar with the concepts of [Prompt Engineering](/docs/advanced/prompt-engineering) and [HTTP Streaming](/docs/
|
|
12
|
+
If you are unfamiliar with the concepts of [Prompt Engineering](/docs/advanced/prompt-engineering) and [HTTP Streaming](/docs/foundations/streaming), you can optionally read these documents first.
|
|
13
13
|
|
|
14
14
|
## Prerequisites
|
|
15
15
|
|
|
@@ -562,5 +562,5 @@ This simple example demonstrates how tools can expand your model's capabilities.
|
|
|
562
562
|
You've built an AI chatbot using the AI SDK! From here, you have several paths to explore:
|
|
563
563
|
|
|
564
564
|
- To learn more about the AI SDK, read through the [documentation](/docs).
|
|
565
|
-
- If you're interested in diving deeper with guides, check out the [RAG (retrieval-augmented generation)](/
|
|
565
|
+
- If you're interested in diving deeper with guides, check out the [RAG (retrieval-augmented generation)](/cookbook/guides/rag-chatbot) and [multi-modal chatbot](/cookbook/guides/multi-modal-chatbot) guides.
|
|
566
566
|
- To jumpstart your first AI project, explore available [templates](https://vercel.com/templates?type=ai).
|
|
@@ -9,7 +9,7 @@ The AI SDK is a powerful TypeScript library designed to help developers build AI
|
|
|
9
9
|
|
|
10
10
|
In this quickstart tutorial, you'll build a simple agent with a streaming chat user interface. Along the way, you'll learn key concepts and techniques that are fundamental to using the SDK in your own projects.
|
|
11
11
|
|
|
12
|
-
If you are unfamiliar with the concepts of [Prompt Engineering](/docs/advanced/prompt-engineering) and [HTTP Streaming](/docs/
|
|
12
|
+
If you are unfamiliar with the concepts of [Prompt Engineering](/docs/advanced/prompt-engineering) and [HTTP Streaming](/docs/foundations/streaming), you can optionally read these documents first.
|
|
13
13
|
|
|
14
14
|
## Prerequisites
|
|
15
15
|
|
|
@@ -508,5 +508,5 @@ This example demonstrates how tools can expand your agent's capabilities. You ca
|
|
|
508
508
|
You've built an AI agent using the AI SDK! From here, you have several paths to explore:
|
|
509
509
|
|
|
510
510
|
- To learn more about the AI SDK, read through the [documentation](/docs).
|
|
511
|
-
- If you're interested in diving deeper with guides, check out the [RAG (retrieval-augmented generation)](/
|
|
511
|
+
- If you're interested in diving deeper with guides, check out the [RAG (retrieval-augmented generation)](/cookbook/guides/rag-chatbot) and [multi-modal chatbot](/cookbook/guides/multi-modal-chatbot) guides.
|
|
512
512
|
- To jumpstart your first AI project, explore available [templates](https://vercel.com/templates?type=ai).
|
|
@@ -7,7 +7,7 @@ description: Learn how to build your first agent with the AI SDK and Expo.
|
|
|
7
7
|
|
|
8
8
|
In this quickstart tutorial, you'll build a simple agent with a streaming chat user interface with [Expo](https://expo.dev/). Along the way, you'll learn key concepts and techniques that are fundamental to using the SDK in your own projects.
|
|
9
9
|
|
|
10
|
-
If you are unfamiliar with the concepts of [Prompt Engineering](/docs/advanced/prompt-engineering) and [HTTP Streaming](/docs/
|
|
10
|
+
If you are unfamiliar with the concepts of [Prompt Engineering](/docs/advanced/prompt-engineering) and [HTTP Streaming](/docs/foundations/streaming), you can optionally read these documents first.
|
|
11
11
|
|
|
12
12
|
## Prerequisites
|
|
13
13
|
|
|
@@ -762,5 +762,5 @@ import '@/polyfills';
|
|
|
762
762
|
You've built an AI chatbot using the AI SDK! From here, you have several paths to explore:
|
|
763
763
|
|
|
764
764
|
- To learn more about the AI SDK, read through the [documentation](/docs).
|
|
765
|
-
- If you're interested in diving deeper with guides, check out the [RAG (retrieval-augmented generation)](/
|
|
765
|
+
- If you're interested in diving deeper with guides, check out the [RAG (retrieval-augmented generation)](/cookbook/guides/rag-chatbot) and [multi-modal chatbot](/cookbook/guides/multi-modal-chatbot) guides.
|
|
766
766
|
- To jumpstart your first AI project, explore available [templates](https://vercel.com/templates?type=ai).
|
|
@@ -9,7 +9,7 @@ The AI SDK is a powerful TypeScript library designed to help developers build AI
|
|
|
9
9
|
|
|
10
10
|
In this quickstart tutorial, you'll build a simple agent with a streaming chat user interface. Along the way, you'll learn key concepts and techniques that are fundamental to using the AI SDK in your own projects.
|
|
11
11
|
|
|
12
|
-
If you are unfamiliar with the concepts of [Prompt Engineering](/docs/advanced/prompt-engineering) and [HTTP Streaming](/docs/
|
|
12
|
+
If you are unfamiliar with the concepts of [Prompt Engineering](/docs/advanced/prompt-engineering) and [HTTP Streaming](/docs/foundations/streaming), you can optionally read these documents first.
|
|
13
13
|
|
|
14
14
|
## Prerequisites
|
|
15
15
|
|
|
@@ -579,5 +579,5 @@ This simple example demonstrates how tools can expand your model's capabilities.
|
|
|
579
579
|
You've built an AI chatbot using the AI SDK! From here, you have several paths to explore:
|
|
580
580
|
|
|
581
581
|
- To learn more about the AI SDK, read through the [documentation](/docs).
|
|
582
|
-
- If you're interested in diving deeper with guides, check out the [RAG (retrieval-augmented generation)](/
|
|
582
|
+
- If you're interested in diving deeper with guides, check out the [RAG (retrieval-augmented generation)](/cookbook/guides/rag-chatbot) and [multi-modal chatbot](/cookbook/guides/multi-modal-chatbot) guides.
|
|
583
583
|
- To jumpstart your first AI project, explore available [templates](https://vercel.com/templates?type=ai).
|
|
@@ -307,9 +307,9 @@ for (const file of result.files) {
|
|
|
307
307
|
| [DeepInfra](/providers/ai-sdk-providers/deepinfra#image-models) | `stabilityai/sdxl-turbo` | 1:1, 16:9, 1:9, 3:2, 2:3, 4:5, 5:4, 9:16, 9:21 |
|
|
308
308
|
| [Replicate](/providers/ai-sdk-providers/replicate) | `black-forest-labs/flux-schnell` | 1:1, 2:3, 3:2, 4:5, 5:4, 16:9, 9:16, 9:21, 21:9 |
|
|
309
309
|
| [Replicate](/providers/ai-sdk-providers/replicate) | `recraft-ai/recraft-v3` | 1024x1024, 1365x1024, 1024x1365, 1536x1024, 1024x1536, 1820x1024, 1024x1820, 1024x2048, 2048x1024, 1434x1024, 1024x1434, 1024x1280, 1280x1024, 1024x1707, 1707x1024 |
|
|
310
|
-
| [Google](/providers/ai-sdk-providers/google#image-models)
|
|
311
|
-
| [Google](/providers/ai-sdk-providers/google#image-models)
|
|
312
|
-
| [Google](/providers/ai-sdk-providers/google#image-models)
|
|
310
|
+
| [Google](/providers/ai-sdk-providers/google-generative-ai#image-models) | `imagen-4.0-generate-001` | 1:1, 3:4, 4:3, 9:16, 16:9 |
|
|
311
|
+
| [Google](/providers/ai-sdk-providers/google-generative-ai#image-models) | `imagen-4.0-fast-generate-001` | 1:1, 3:4, 4:3, 9:16, 16:9 |
|
|
312
|
+
| [Google](/providers/ai-sdk-providers/google-generative-ai#image-models) | `imagen-4.0-ultra-generate-001` | 1:1, 3:4, 4:3, 9:16, 16:9 |
|
|
313
313
|
| [Google Vertex](/providers/ai-sdk-providers/google-vertex#image-models) | `imagen-4.0-generate-001` | 1:1, 3:4, 4:3, 9:16, 16:9 |
|
|
314
314
|
| [Google Vertex](/providers/ai-sdk-providers/google-vertex#image-models) | `imagen-4.0-fast-generate-001` | 1:1, 3:4, 4:3, 9:16, 16:9 |
|
|
315
315
|
| [Google Vertex](/providers/ai-sdk-providers/google-vertex#image-models) | `imagen-4.0-ultra-generate-001` | 1:1, 3:4, 4:3, 9:16, 16:9 |
|
|
@@ -351,7 +351,7 @@ try {
|
|
|
351
351
|
| ----------------------------------------------------------------------- | --------------------------- | -------------------------------------- |
|
|
352
352
|
| [FAL](/providers/ai-sdk-providers/fal#video-models) | `luma-dream-machine/ray-2` | Text-to-video, image-to-video |
|
|
353
353
|
| [FAL](/providers/ai-sdk-providers/fal#video-models) | `minimax-video` | Text-to-video |
|
|
354
|
-
| [Google](/providers/ai-sdk-providers/google#video-models)
|
|
354
|
+
| [Google](/providers/ai-sdk-providers/google-generative-ai#video-models) | `veo-2.0-generate-001` | Text-to-video, up to 4 videos per call |
|
|
355
355
|
| [Google Vertex](/providers/ai-sdk-providers/google-vertex#video-models) | `veo-3.1-generate-001` | Text-to-video, audio generation |
|
|
356
356
|
| [Google Vertex](/providers/ai-sdk-providers/google-vertex#video-models) | `veo-3.1-fast-generate-001` | Text-to-video, audio generation |
|
|
357
357
|
| [Google Vertex](/providers/ai-sdk-providers/google-vertex#video-models) | `veo-3.0-generate-001` | Text-to-video, audio generation |
|
|
@@ -81,7 +81,7 @@ You can then use that enhanced model in functions like `generateText` and `strea
|
|
|
81
81
|
The `extractReasoningMiddleware` function also includes a `startWithReasoning` option.
|
|
82
82
|
When set to `true`, the reasoning tag will be prepended to the generated text.
|
|
83
83
|
This is useful for models that do not include the reasoning tag at the beginning of the response.
|
|
84
|
-
For more details, see the [DeepSeek R1 guide](/
|
|
84
|
+
For more details, see the [DeepSeek R1 guide](/cookbook/guides/r1#deepseek-r1-middleware).
|
|
85
85
|
|
|
86
86
|
### Extract JSON
|
|
87
87
|
|
|
@@ -902,7 +902,7 @@ Check out the [stream protocol guide](/docs/ai-sdk-ui/stream-protocol) for more
|
|
|
902
902
|
|
|
903
903
|
## Reasoning
|
|
904
904
|
|
|
905
|
-
Some models such as
|
|
905
|
+
Some models such as DeepSeek `deepseek-r1`
|
|
906
906
|
and Anthropic `claude-3-7-sonnet-20250219` support reasoning tokens.
|
|
907
907
|
These tokens are typically sent before the message content.
|
|
908
908
|
You can forward them to the client with the `sendReasoning` option:
|
|
@@ -69,7 +69,7 @@ Once you have signed in, you should see your newly created repository from the p
|
|
|
69
69
|
|
|
70
70
|
### Add Environment Variables
|
|
71
71
|
|
|
72
|
-
Your application
|
|
72
|
+
Your application uses environment secrets to store your OpenAI API key using a `.env.local` file locally in development. To add this API key to your production deployment, expand the "Environment Variables" section and paste in your `.env.local` file. Vercel will automatically parse your variables and enter them in the appropriate `key:value` format.
|
|
73
73
|
|
|
74
74
|
### Deploy
|
|
75
75
|
|
|
@@ -489,5 +489,5 @@ Allows you to easily create a conversational user interface for your chatbot app
|
|
|
489
489
|
## Learn more
|
|
490
490
|
|
|
491
491
|
- [Chatbot](/docs/ai-sdk-ui/chatbot)
|
|
492
|
-
- [Chatbot with Tools](/docs/ai-sdk-ui/chatbot-
|
|
492
|
+
- [Chatbot with Tools](/docs/ai-sdk-ui/chatbot-tool-usage)
|
|
493
493
|
- [UIMessage](/docs/reference/ai-sdk-core/ui-message)
|
|
@@ -13,7 +13,7 @@ description: Reference for the useActions function from the AI SDK RSC
|
|
|
13
13
|
|
|
14
14
|
It is a hook to help you access your Server Actions from the client. This is particularly useful for building interfaces that require user interactions with the server.
|
|
15
15
|
|
|
16
|
-
It is required to access these server actions via this hook because they are patched when passed through the context. Accessing them directly may result in a [Cannot find Client Component error](/docs/troubleshooting/
|
|
16
|
+
It is required to access these server actions via this hook because they are patched when passed through the context. Accessing them directly may result in a [Cannot find Client Component error](/docs/troubleshooting/server-actions-in-client-components).
|
|
17
17
|
|
|
18
18
|
## Import
|
|
19
19
|
|
|
@@ -14,7 +14,7 @@ description: Learn how to upgrade AI SDK 3.4 to 4.0.
|
|
|
14
14
|
## Recommended Migration Process
|
|
15
15
|
|
|
16
16
|
1. Backup your project. If you use a versioning control system, make sure all previous versions are committed.
|
|
17
|
-
1. [Migrate to AI SDK 3.4](/docs/
|
|
17
|
+
1. [Migrate to AI SDK 3.4](/docs/migration-guides/migration-guide-3-4).
|
|
18
18
|
1. Upgrade to AI SDK 4.0.
|
|
19
19
|
1. Automatically migrate your code using [codemods](#codemods).
|
|
20
20
|
> If you don't want to use codemods, we recommend resolving all deprecation warnings before upgrading to AI SDK 4.0.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.106",
|
|
4
4
|
"description": "AI SDK by Vercel - The AI Toolkit for TypeScript and JavaScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@opentelemetry/api": "1.9.0",
|
|
48
|
-
"@ai-sdk/gateway": "3.0.
|
|
48
|
+
"@ai-sdk/gateway": "3.0.60",
|
|
49
49
|
"@ai-sdk/provider": "3.0.8",
|
|
50
|
-
"@ai-sdk/provider-utils": "4.0.
|
|
50
|
+
"@ai-sdk/provider-utils": "4.0.16"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@edge-runtime/vm": "^5.0.0",
|