ai 7.0.146 → 7.0.147
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 +8 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/internal/index.js +1 -1
- package/docs/02-foundations/01-overview.mdx +1 -1
- package/docs/02-foundations/02-providers-and-models.mdx +2 -2
- package/docs/02-foundations/03-prompts.mdx +3 -3
- package/docs/02-foundations/04-tools.mdx +2 -2
- package/docs/02-getting-started/00-choosing-a-provider.mdx +1 -1
- package/docs/02-getting-started/02-nextjs-app-router.mdx +4 -4
- package/docs/02-getting-started/03-nextjs-pages-router.mdx +4 -4
- package/docs/02-getting-started/04-svelte.mdx +3 -3
- package/docs/02-getting-started/05-nuxt.mdx +3 -3
- package/docs/02-getting-started/06-nodejs.mdx +2 -2
- package/docs/02-getting-started/07-expo.mdx +4 -4
- package/docs/02-getting-started/08-tanstack-start.mdx +4 -4
- package/docs/03-ai-sdk-core/10-generating-structured-data.mdx +1 -1
- package/docs/03-ai-sdk-core/18-tools.mdx +5 -5
- package/docs/03-ai-sdk-core/37-speech.mdx +1 -1
- package/docs/03-ai-sdk-core/41-skill-uploads.mdx +24 -10
- package/docs/03-ai-sdk-harnesses/02-harness-agent.mdx +1 -1
- package/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +5 -5
- package/docs/03-ai-sdk-harnesses/06-workflow-utilities.mdx +12 -0
- package/docs/03-ai-sdk-harnesses/07-ui.mdx +2 -2
- package/docs/04-ai-sdk-ui/03-chatbot-tool-usage.mdx +2 -2
- package/docs/05-ai-sdk-rsc/01-overview.mdx +1 -1
- package/docs/05-ai-sdk-rsc/10-migrating-to-ui.mdx +1 -1
- package/docs/06-advanced/01-prompt-engineering.mdx +1 -1
- package/docs/06-advanced/03-backpressure.mdx +1 -1
- package/docs/06-advanced/10-vercel-deployment-guide.mdx +1 -1
- package/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +1 -1
- package/docs/07-reference/01-ai-sdk-core/14-upload-skill.mdx +3 -3
- package/docs/07-reference/01-ai-sdk-core/22-dynamic-tool.mdx +1 -1
- package/docs/08-migration-guides/index.mdx +12 -12
- package/docs/09-troubleshooting/05-tool-invocation-missing-result.mdx +1 -1
- package/package.json +2 -2
- package/src/generate-text/output.ts +1 -1
- package/src/ui/process-ui-message-stream.ts +1 -0
|
@@ -17,7 +17,7 @@ const { providerReference } = await uploadSkill({
|
|
|
17
17
|
files: [
|
|
18
18
|
{
|
|
19
19
|
path: 'my-skill/SKILL.md',
|
|
20
|
-
|
|
20
|
+
data: readFileSync('./SKILL.md'),
|
|
21
21
|
},
|
|
22
22
|
],
|
|
23
23
|
displayTitle: 'My Skill',
|
|
@@ -42,9 +42,9 @@ const { providerReference } = await uploadSkill({
|
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
name: 'files',
|
|
45
|
-
type: '
|
|
45
|
+
type: 'UploadSkillFile[]',
|
|
46
46
|
description:
|
|
47
|
-
|
|
47
|
+
"The files that make up the skill. Each file must have a relative `path` and `data`. The `data` can be a string, a `Uint8Array`, or an object with `type: 'text'` and a string `text` value, or `type: 'data'` and a string `data` value.",
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
name: 'displayTitle',
|
|
@@ -224,7 +224,7 @@ When used with useChat (`UIMessage` format), dynamic tools appear as `dynamic-to
|
|
|
224
224
|
switch (part.type) {
|
|
225
225
|
case 'dynamic-tool':
|
|
226
226
|
return (
|
|
227
|
-
<div>
|
|
227
|
+
<div key={part.toolCallId}>
|
|
228
228
|
<h4>Tool: {part.toolName}</h4>
|
|
229
229
|
<pre>{JSON.stringify(part.input, null, 2)}</pre>
|
|
230
230
|
</div>
|
|
@@ -6,18 +6,18 @@ collapsed: true
|
|
|
6
6
|
|
|
7
7
|
# Migration Guides
|
|
8
8
|
|
|
9
|
-
- [
|
|
10
|
-
- [
|
|
11
|
-
- [
|
|
12
|
-
- [
|
|
13
|
-
- [
|
|
14
|
-
- [
|
|
15
|
-
- [
|
|
16
|
-
- [
|
|
17
|
-
- [
|
|
18
|
-
- [
|
|
19
|
-
- [
|
|
9
|
+
- [Migrate AI SDK 6.x to 7.0](/docs/migration-guides/migration-guide-7-0)
|
|
10
|
+
- [Migrate AI SDK 5.x to 6.0](/docs/migration-guides/migration-guide-6-0)
|
|
11
|
+
- [Migrate AI SDK 4.x to 5.0](/docs/migration-guides/migration-guide-5-0)
|
|
12
|
+
- [Migrate your data to AI SDK 5.0](/docs/migration-guides/migration-guide-5-0-data)
|
|
13
|
+
- [Migrate AI SDK 4.1 to 4.2](/docs/migration-guides/migration-guide-4-2)
|
|
14
|
+
- [Migrate AI SDK 4.0 to 4.1](/docs/migration-guides/migration-guide-4-1)
|
|
15
|
+
- [Migrate AI SDK 3.4 to 4.0](/docs/migration-guides/migration-guide-4-0)
|
|
16
|
+
- [Migrate AI SDK 3.3 to 3.4](/docs/migration-guides/migration-guide-3-4)
|
|
17
|
+
- [Migrate AI SDK 3.2 to 3.3](/docs/migration-guides/migration-guide-3-3)
|
|
18
|
+
- [Migrate AI SDK 3.1 to 3.2](/docs/migration-guides/migration-guide-3-2)
|
|
19
|
+
- [Migrate AI SDK 3.0 to 3.1](/docs/migration-guides/migration-guide-3-1)
|
|
20
20
|
|
|
21
21
|
## Versioning
|
|
22
22
|
|
|
23
|
-
- [
|
|
23
|
+
- [Versioning](/docs/migration-guides/versioning)
|
|
@@ -38,7 +38,7 @@ const tools = {
|
|
|
38
38
|
};
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
2.
|
|
41
|
+
2. For client-side execution with `useChat` (omitting the `execute` function), you must provide results using `addToolOutput`:
|
|
42
42
|
|
|
43
43
|
```tsx
|
|
44
44
|
import { useChat } from '@ai-sdk/react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.147",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AI SDK by Vercel - build apps like ChatGPT, Claude, Gemini, and more with a single interface for any model using the Vercel AI Gateway or go direct to OpenAI, Anthropic, Google, or any other model provider.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@ai-sdk/gateway": "4.0.
|
|
45
|
+
"@ai-sdk/gateway": "4.0.120",
|
|
46
46
|
"@ai-sdk/provider": "4.0.31",
|
|
47
47
|
"@ai-sdk/provider-utils": "5.0.64"
|
|
48
48
|
},
|
|
@@ -491,7 +491,7 @@ function getArrayLengthValidationError({
|
|
|
491
491
|
|
|
492
492
|
/**
|
|
493
493
|
* Output specification for choice generation.
|
|
494
|
-
* When the model generates a text response, it will return
|
|
494
|
+
* When the model generates a text response, it will return one of the choice options.
|
|
495
495
|
*
|
|
496
496
|
* @param options - The available choices.
|
|
497
497
|
* @param name - Optional name of the output that should be generated. Used by some providers for additional LLM guidance, e.g. via tool or schema name.
|
|
@@ -271,6 +271,7 @@ export function processUIMessageStream<UI_MESSAGE extends UIMessage>({
|
|
|
271
271
|
|
|
272
272
|
if (part != null) {
|
|
273
273
|
part.state = options.state;
|
|
274
|
+
anyPart.type = `tool-${options.toolName}`;
|
|
274
275
|
anyPart.input = anyOptions.input;
|
|
275
276
|
anyPart.output = anyOptions.output;
|
|
276
277
|
anyPart.errorText = anyOptions.errorText;
|