@ai-sdk/provider 3.0.16 → 3.0.18
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.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/package.json +1 -1
- package/src/language-model/v3/language-model-v3-prompt.ts +14 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-sdk/provider
|
|
2
2
|
|
|
3
|
+
## 3.0.18
|
|
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
|
+
|
|
9
|
+
## 3.0.17
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- da2e17b: fix(provider): preserve opaque file URI strings for provider serialization
|
|
14
|
+
|
|
3
15
|
## 3.0.16
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1152,6 +1152,13 @@ interface LanguageModelV3FilePart {
|
|
|
1152
1152
|
* File data. Can be a Uint8Array, base64 encoded data as a string or a URL.
|
|
1153
1153
|
*/
|
|
1154
1154
|
data: LanguageModelV3DataContent;
|
|
1155
|
+
/**
|
|
1156
|
+
* The original URL string before it was parsed into a URL.
|
|
1157
|
+
*
|
|
1158
|
+
* This is available when parsing changes the string and a provider needs to
|
|
1159
|
+
* preserve an opaque non-HTTP URI exactly.
|
|
1160
|
+
*/
|
|
1161
|
+
originalUrl?: string;
|
|
1155
1162
|
/**
|
|
1156
1163
|
* IANA media type of the file.
|
|
1157
1164
|
*
|
|
@@ -1329,6 +1336,11 @@ type LanguageModelV3ToolResultOutput = {
|
|
|
1329
1336
|
* URL of the file.
|
|
1330
1337
|
*/
|
|
1331
1338
|
url: string;
|
|
1339
|
+
/**
|
|
1340
|
+
* IANA media type.
|
|
1341
|
+
* @see https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
1342
|
+
*/
|
|
1343
|
+
mediaType?: string;
|
|
1332
1344
|
/**
|
|
1333
1345
|
* Provider-specific options.
|
|
1334
1346
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1152,6 +1152,13 @@ interface LanguageModelV3FilePart {
|
|
|
1152
1152
|
* File data. Can be a Uint8Array, base64 encoded data as a string or a URL.
|
|
1153
1153
|
*/
|
|
1154
1154
|
data: LanguageModelV3DataContent;
|
|
1155
|
+
/**
|
|
1156
|
+
* The original URL string before it was parsed into a URL.
|
|
1157
|
+
*
|
|
1158
|
+
* This is available when parsing changes the string and a provider needs to
|
|
1159
|
+
* preserve an opaque non-HTTP URI exactly.
|
|
1160
|
+
*/
|
|
1161
|
+
originalUrl?: string;
|
|
1155
1162
|
/**
|
|
1156
1163
|
* IANA media type of the file.
|
|
1157
1164
|
*
|
|
@@ -1329,6 +1336,11 @@ type LanguageModelV3ToolResultOutput = {
|
|
|
1329
1336
|
* URL of the file.
|
|
1330
1337
|
*/
|
|
1331
1338
|
url: string;
|
|
1339
|
+
/**
|
|
1340
|
+
* IANA media type.
|
|
1341
|
+
* @see https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
1342
|
+
*/
|
|
1343
|
+
mediaType?: string;
|
|
1332
1344
|
/**
|
|
1333
1345
|
* Provider-specific options.
|
|
1334
1346
|
*/
|
package/package.json
CHANGED
|
@@ -106,6 +106,14 @@ export interface LanguageModelV3FilePart {
|
|
|
106
106
|
*/
|
|
107
107
|
data: LanguageModelV3DataContent;
|
|
108
108
|
|
|
109
|
+
/**
|
|
110
|
+
* The original URL string before it was parsed into a URL.
|
|
111
|
+
*
|
|
112
|
+
* This is available when parsing changes the string and a provider needs to
|
|
113
|
+
* preserve an opaque non-HTTP URI exactly.
|
|
114
|
+
*/
|
|
115
|
+
originalUrl?: string;
|
|
116
|
+
|
|
109
117
|
/**
|
|
110
118
|
* IANA media type of the file.
|
|
111
119
|
*
|
|
@@ -324,6 +332,12 @@ export type LanguageModelV3ToolResultOutput =
|
|
|
324
332
|
*/
|
|
325
333
|
url: string;
|
|
326
334
|
|
|
335
|
+
/**
|
|
336
|
+
* IANA media type.
|
|
337
|
+
* @see https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
338
|
+
*/
|
|
339
|
+
mediaType?: string;
|
|
340
|
+
|
|
327
341
|
/**
|
|
328
342
|
* Provider-specific options.
|
|
329
343
|
*/
|