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/CHANGELOG.md +12 -0
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# ai
|
2
2
|
|
3
|
+
## 5.0.10
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 63a5dc5: fix(ai): convert user message text/file part provider metadata in convertToModelMessages
|
8
|
+
|
9
|
+
## 5.0.9
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- afd5c2a: fix(ai): preserve filename for file parts in convertToModelMessages
|
14
|
+
|
3
15
|
## 5.0.8
|
4
16
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
@@ -9386,14 +9386,16 @@ function convertToModelMessages(messages, options) {
|
|
9386
9386
|
case "text":
|
9387
9387
|
return {
|
9388
9388
|
type: "text",
|
9389
|
-
text: part.text
|
9389
|
+
text: part.text,
|
9390
|
+
...part.providerMetadata != null ? { providerOptions: part.providerMetadata } : {}
|
9390
9391
|
};
|
9391
9392
|
case "file":
|
9392
9393
|
return {
|
9393
9394
|
type: "file",
|
9394
9395
|
mediaType: part.mediaType,
|
9395
9396
|
filename: part.filename,
|
9396
|
-
data: part.url
|
9397
|
+
data: part.url,
|
9398
|
+
...part.providerMetadata != null ? { providerOptions: part.providerMetadata } : {}
|
9397
9399
|
};
|
9398
9400
|
default:
|
9399
9401
|
return part;
|
@@ -9421,6 +9423,7 @@ function convertToModelMessages(messages, options) {
|
|
9421
9423
|
content.push({
|
9422
9424
|
type: "file",
|
9423
9425
|
mediaType: part.mediaType,
|
9426
|
+
filename: part.filename,
|
9424
9427
|
data: part.url
|
9425
9428
|
});
|
9426
9429
|
} else if (part.type === "reasoning") {
|