ai 3.4.17 → 3.4.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai",
3
- "version": "3.4.17",
3
+ "version": "3.4.20",
4
4
  "description": "AI SDK by Vercel - The AI Toolkit for TypeScript and JavaScript",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -64,20 +64,19 @@
64
64
  }
65
65
  },
66
66
  "dependencies": {
67
- "@ai-sdk/provider": "0.0.24",
68
- "@ai-sdk/provider-utils": "1.0.20",
69
- "@ai-sdk/react": "0.0.64",
70
- "@ai-sdk/solid": "0.0.50",
71
- "@ai-sdk/svelte": "0.0.52",
72
- "@ai-sdk/ui-utils": "0.0.46",
73
- "@ai-sdk/vue": "0.0.55",
67
+ "@ai-sdk/provider": "0.0.26",
68
+ "@ai-sdk/provider-utils": "1.0.22",
69
+ "@ai-sdk/react": "0.0.66",
70
+ "@ai-sdk/solid": "0.0.52",
71
+ "@ai-sdk/svelte": "0.0.54",
72
+ "@ai-sdk/ui-utils": "0.0.48",
73
+ "@ai-sdk/vue": "0.0.57",
74
74
  "@opentelemetry/api": "1.9.0",
75
75
  "eventsource-parser": "1.1.2",
76
76
  "jsondiffpatch": "0.6.0",
77
- "json-schema": "0.4.0",
78
- "nanoid": "3.3.6",
79
- "secure-json-parse": "2.7.0",
80
- "zod-to-json-schema": "3.23.2"
77
+ "json-schema": "^0.4.0",
78
+ "secure-json-parse": "^2.7.0",
79
+ "zod-to-json-schema": "^3.23.3"
81
80
  },
82
81
  "devDependencies": {
83
82
  "@anthropic-ai/sdk": "0.18.0",
@@ -234,6 +234,15 @@ Data content. Can either be a base64-encoded string, a Uint8Array, an ArrayBuffe
234
234
  */
235
235
  type DataContent = string | Uint8Array | ArrayBuffer | Buffer;
236
236
 
237
+ type ToolResultContent = Array<{
238
+ type: 'text';
239
+ text: string;
240
+ } | {
241
+ type: 'image';
242
+ data: string;
243
+ mimeType?: string;
244
+ }>;
245
+
237
246
  /**
238
247
  Text content part of a prompt. It contains a string of text.
239
248
  */
@@ -338,6 +347,10 @@ interface ToolResultPart {
338
347
  */
339
348
  result: unknown;
340
349
  /**
350
+ Multi-part content of the tool result. Only for tools that support multipart results.
351
+ */
352
+ experimental_content?: ToolResultContent;
353
+ /**
341
354
  Optional flag if the result is an error or an error message.
342
355
  */
343
356
  isError?: boolean;
@@ -424,7 +437,8 @@ It can be a user message, an assistant message, or a tool message.
424
437
  type CoreMessage = CoreSystemMessage | CoreUserMessage | CoreAssistantMessage | CoreToolMessage;
425
438
 
426
439
  /**
427
- Prompt part of the AI function options. It contains a system message, a simple text prompt, or a list of messages.
440
+ Prompt part of the AI function options.
441
+ It contains a system message, a simple text prompt, or a list of messages.
428
442
  */
429
443
  type Prompt = {
430
444
  /**
@@ -436,7 +450,7 @@ type Prompt = {
436
450
  */
437
451
  prompt?: string;
438
452
  /**
439
- A list of messsages. You can either use `prompt` or `messages` but not both.
453
+ A list of messages. You can either use `prompt` or `messages` but not both.
440
454
  */
441
455
  messages?: Array<CoreMessage>;
442
456
  };
@@ -232,6 +232,15 @@ Data content. Can either be a base64-encoded string, a Uint8Array, an ArrayBuffe
232
232
  */
233
233
  type DataContent = string | Uint8Array | ArrayBuffer | Buffer;
234
234
 
235
+ type ToolResultContent = Array<{
236
+ type: 'text';
237
+ text: string;
238
+ } | {
239
+ type: 'image';
240
+ data: string;
241
+ mimeType?: string;
242
+ }>;
243
+
235
244
  /**
236
245
  Text content part of a prompt. It contains a string of text.
237
246
  */
@@ -336,6 +345,10 @@ interface ToolResultPart {
336
345
  */
337
346
  result: unknown;
338
347
  /**
348
+ Multi-part content of the tool result. Only for tools that support multipart results.
349
+ */
350
+ experimental_content?: ToolResultContent;
351
+ /**
339
352
  Optional flag if the result is an error or an error message.
340
353
  */
341
354
  isError?: boolean;
@@ -422,7 +435,8 @@ It can be a user message, an assistant message, or a tool message.
422
435
  type CoreMessage = CoreSystemMessage | CoreUserMessage | CoreAssistantMessage | CoreToolMessage;
423
436
 
424
437
  /**
425
- Prompt part of the AI function options. It contains a system message, a simple text prompt, or a list of messages.
438
+ Prompt part of the AI function options.
439
+ It contains a system message, a simple text prompt, or a list of messages.
426
440
  */
427
441
  type Prompt = {
428
442
  /**
@@ -434,7 +448,7 @@ type Prompt = {
434
448
  */
435
449
  prompt?: string;
436
450
  /**
437
- A list of messsages. You can either use `prompt` or `messages` but not both.
451
+ A list of messages. You can either use `prompt` or `messages` but not both.
438
452
  */
439
453
  messages?: Array<CoreMessage>;
440
454
  };