@ai-sdk/provider-utils 4.0.0-beta.48 → 4.0.0-beta.50
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 +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-sdk/provider-utils
|
|
2
2
|
|
|
3
|
+
## 4.0.0-beta.50
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 32223c8: feat: add toolCallId arg to toModelOutput
|
|
8
|
+
|
|
9
|
+
## 4.0.0-beta.49
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 83e5744: feat: support async Tool.toModelOutput
|
|
14
|
+
|
|
3
15
|
## 4.0.0-beta.48
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1003,8 +1003,15 @@ type Tool<INPUT extends JSONValue | unknown | never = any, OUTPUT extends JSONVa
|
|
|
1003
1003
|
* If not provided, the tool result will be sent as a JSON object.
|
|
1004
1004
|
*/
|
|
1005
1005
|
toModelOutput?: (options: {
|
|
1006
|
+
/**
|
|
1007
|
+
* The ID of the tool call. You can use it e.g. when sending tool-call related information with stream data.
|
|
1008
|
+
*/
|
|
1009
|
+
toolCallId: string;
|
|
1010
|
+
/**
|
|
1011
|
+
* The output of the tool call.
|
|
1012
|
+
*/
|
|
1006
1013
|
output: 0 extends 1 & OUTPUT ? any : [OUTPUT] extends [never] ? any : NoInfer<OUTPUT>;
|
|
1007
|
-
}) => ToolResultOutput
|
|
1014
|
+
}) => ToolResultOutput | PromiseLike<ToolResultOutput>;
|
|
1008
1015
|
} & ({
|
|
1009
1016
|
/**
|
|
1010
1017
|
Tool with user-defined input and output schemas.
|
|
@@ -1060,8 +1067,15 @@ declare function dynamicTool(tool: {
|
|
|
1060
1067
|
* If not provided, the tool result will be sent as a JSON object.
|
|
1061
1068
|
*/
|
|
1062
1069
|
toModelOutput?: (options: {
|
|
1070
|
+
/**
|
|
1071
|
+
* The ID of the tool call. You can use it e.g. when sending tool-call related information with stream data.
|
|
1072
|
+
*/
|
|
1073
|
+
toolCallId: string;
|
|
1074
|
+
/**
|
|
1075
|
+
* The output of the tool call.
|
|
1076
|
+
*/
|
|
1063
1077
|
output: unknown;
|
|
1064
|
-
}) => ToolResultOutput
|
|
1078
|
+
}) => ToolResultOutput | PromiseLike<ToolResultOutput>;
|
|
1065
1079
|
/**
|
|
1066
1080
|
* Whether the tool needs approval before it can be executed.
|
|
1067
1081
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1003,8 +1003,15 @@ type Tool<INPUT extends JSONValue | unknown | never = any, OUTPUT extends JSONVa
|
|
|
1003
1003
|
* If not provided, the tool result will be sent as a JSON object.
|
|
1004
1004
|
*/
|
|
1005
1005
|
toModelOutput?: (options: {
|
|
1006
|
+
/**
|
|
1007
|
+
* The ID of the tool call. You can use it e.g. when sending tool-call related information with stream data.
|
|
1008
|
+
*/
|
|
1009
|
+
toolCallId: string;
|
|
1010
|
+
/**
|
|
1011
|
+
* The output of the tool call.
|
|
1012
|
+
*/
|
|
1006
1013
|
output: 0 extends 1 & OUTPUT ? any : [OUTPUT] extends [never] ? any : NoInfer<OUTPUT>;
|
|
1007
|
-
}) => ToolResultOutput
|
|
1014
|
+
}) => ToolResultOutput | PromiseLike<ToolResultOutput>;
|
|
1008
1015
|
} & ({
|
|
1009
1016
|
/**
|
|
1010
1017
|
Tool with user-defined input and output schemas.
|
|
@@ -1060,8 +1067,15 @@ declare function dynamicTool(tool: {
|
|
|
1060
1067
|
* If not provided, the tool result will be sent as a JSON object.
|
|
1061
1068
|
*/
|
|
1062
1069
|
toModelOutput?: (options: {
|
|
1070
|
+
/**
|
|
1071
|
+
* The ID of the tool call. You can use it e.g. when sending tool-call related information with stream data.
|
|
1072
|
+
*/
|
|
1073
|
+
toolCallId: string;
|
|
1074
|
+
/**
|
|
1075
|
+
* The output of the tool call.
|
|
1076
|
+
*/
|
|
1063
1077
|
output: unknown;
|
|
1064
|
-
}) => ToolResultOutput
|
|
1078
|
+
}) => ToolResultOutput | PromiseLike<ToolResultOutput>;
|
|
1065
1079
|
/**
|
|
1066
1080
|
* Whether the tool needs approval before it can be executed.
|
|
1067
1081
|
*/
|
package/dist/index.js
CHANGED
|
@@ -378,7 +378,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
|
|
|
378
378
|
}
|
|
379
379
|
|
|
380
380
|
// src/version.ts
|
|
381
|
-
var VERSION = true ? "4.0.0-beta.
|
|
381
|
+
var VERSION = true ? "4.0.0-beta.50" : "0.0.0-test";
|
|
382
382
|
|
|
383
383
|
// src/get-from-api.ts
|
|
384
384
|
var getOriginalFetch = () => globalThis.fetch;
|