ai 5.0.8 → 5.0.10

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/dist/index.mjs CHANGED
@@ -9351,14 +9351,16 @@ function convertToModelMessages(messages, options) {
9351
9351
  case "text":
9352
9352
  return {
9353
9353
  type: "text",
9354
- text: part.text
9354
+ text: part.text,
9355
+ ...part.providerMetadata != null ? { providerOptions: part.providerMetadata } : {}
9355
9356
  };
9356
9357
  case "file":
9357
9358
  return {
9358
9359
  type: "file",
9359
9360
  mediaType: part.mediaType,
9360
9361
  filename: part.filename,
9361
- data: part.url
9362
+ data: part.url,
9363
+ ...part.providerMetadata != null ? { providerOptions: part.providerMetadata } : {}
9362
9364
  };
9363
9365
  default:
9364
9366
  return part;
@@ -9386,6 +9388,7 @@ function convertToModelMessages(messages, options) {
9386
9388
  content.push({
9387
9389
  type: "file",
9388
9390
  mediaType: part.mediaType,
9391
+ filename: part.filename,
9389
9392
  data: part.url
9390
9393
  });
9391
9394
  } else if (part.type === "reasoning") {