ai 4.1.59 → 4.1.61

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": "4.1.59",
3
+ "version": "4.1.61",
4
4
  "description": "AI SDK by Vercel - The AI Toolkit for TypeScript and JavaScript",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -40,10 +40,10 @@
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
- "@ai-sdk/provider": "1.0.10",
44
- "@ai-sdk/provider-utils": "2.1.12",
45
- "@ai-sdk/react": "1.1.22",
46
- "@ai-sdk/ui-utils": "1.1.18",
43
+ "@ai-sdk/provider": "1.0.11",
44
+ "@ai-sdk/provider-utils": "2.1.13",
45
+ "@ai-sdk/react": "1.1.23",
46
+ "@ai-sdk/ui-utils": "1.1.19",
47
47
  "@opentelemetry/api": "1.9.0",
48
48
  "eventsource-parser": "^3.0.0",
49
49
  "jsondiffpatch": "0.6.0"
@@ -311,6 +311,10 @@ interface FilePart {
311
311
  */
312
312
  data: DataContent | URL;
313
313
  /**
314
+ Optional filename of the file.
315
+ */
316
+ filename?: string;
317
+ /**
314
318
  Mime type of the file.
315
319
  */
316
320
  mimeType: string;
@@ -309,6 +309,10 @@ interface FilePart {
309
309
  */
310
310
  data: DataContent | URL;
311
311
  /**
312
+ Optional filename of the file.
313
+ */
314
+ filename?: string;
315
+ /**
312
316
  Mime type of the file.
313
317
  */
314
318
  mimeType: string;
@@ -585,6 +585,7 @@ function convertPartToLanguageModelPart(part, downloadedAssets) {
585
585
  return {
586
586
  type: "file",
587
587
  data: normalizedData instanceof Uint8Array ? convertDataContentToBase64String(normalizedData) : normalizedData,
588
+ filename: part.filename,
588
589
  mimeType,
589
590
  providerMetadata: (_d = part.providerOptions) != null ? _d : part.experimental_providerMetadata
590
591
  };
@@ -1289,6 +1290,7 @@ var imagePartSchema = z5.object({
1289
1290
  var filePartSchema = z5.object({
1290
1291
  type: z5.literal("file"),
1291
1292
  data: z5.union([dataContentSchema, z5.instanceof(URL)]),
1293
+ filename: z5.string().optional(),
1292
1294
  mimeType: z5.string(),
1293
1295
  providerOptions: providerMetadataSchema.optional(),
1294
1296
  experimental_providerMetadata: providerMetadataSchema.optional()