ai 6.0.291 → 6.0.293

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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # ai
2
2
 
3
+ ## 6.0.293
4
+
5
+ ### Patch Changes
6
+
7
+ - 3983fea: fix(provider): preserve media types on tool result file URLs and match full MIME types exactly when checking native URL support.
8
+ - Updated dependencies [3983fea]
9
+ - @ai-sdk/provider@3.0.18
10
+ - @ai-sdk/provider-utils@4.0.55
11
+ - @ai-sdk/gateway@3.0.203
12
+
13
+ ## 6.0.292
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [2cf7cb4]
18
+ - Updated dependencies [af4a3e4]
19
+ - @ai-sdk/gateway@3.0.202
20
+
3
21
  ## 6.0.291
4
22
 
5
23
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1334,7 +1334,7 @@ function detectMediaType({
1334
1334
  var import_provider_utils3 = require("@ai-sdk/provider-utils");
1335
1335
 
1336
1336
  // src/version.ts
1337
- var VERSION = true ? "6.0.291" : "0.0.0-test";
1337
+ var VERSION = true ? "6.0.293" : "0.0.0-test";
1338
1338
 
1339
1339
  // src/util/download/download.ts
1340
1340
  var download = async ({
@@ -1803,7 +1803,7 @@ async function downloadAssets(messages, download2, supportedUrls) {
1803
1803
  if (contentPart.type === "image-url" || contentPart.type === "file-url") {
1804
1804
  downloadableFiles.push({
1805
1805
  data: new URL(contentPart.url),
1806
- mediaType: contentPart.type === "image-url" ? "image/*" : void 0
1806
+ mediaType: contentPart.type === "image-url" ? "image/*" : contentPart.mediaType
1807
1807
  });
1808
1808
  }
1809
1809
  }
@@ -2244,6 +2244,7 @@ var outputSchema = import_v44.z.discriminatedUnion(
2244
2244
  import_v44.z.object({
2245
2245
  type: import_v44.z.literal("file-url"),
2246
2246
  url: import_v44.z.string(),
2247
+ mediaType: import_v44.z.string().optional(),
2247
2248
  providerOptions: providerMetadataSchema.optional()
2248
2249
  }),
2249
2250
  import_v44.z.object({