@ai-sdk/provider-utils 4.0.57 → 4.0.58

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,11 @@
1
1
  # @ai-sdk/provider-utils
2
2
 
3
+ ## 4.0.58
4
+
5
+ ### Patch Changes
6
+
7
+ - 604b4d3: docs(provider-utils): clarify how `ToolApprovalResponse.reason` is handled for approved and denied tool calls
8
+
3
9
  ## 4.0.57
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1062,6 +1062,13 @@ type ToolApprovalResponse = {
1062
1062
  approved: boolean;
1063
1063
  /**
1064
1064
  * Optional reason for the approval or denial.
1065
+ *
1066
+ * For denied tool calls, the reason is included in the `execution-denied`
1067
+ * tool result that is sent to the model. For approved tool calls that are
1068
+ * executed by the SDK, the reason remains in the message history: it is not
1069
+ * included in the model prompt and is not exposed through a dedicated tool
1070
+ * execution option. For provider-executed tools, the approval response
1071
+ * (including the reason) is forwarded to the provider.
1065
1072
  */
1066
1073
  reason?: string;
1067
1074
  /**
package/dist/index.d.ts CHANGED
@@ -1062,6 +1062,13 @@ type ToolApprovalResponse = {
1062
1062
  approved: boolean;
1063
1063
  /**
1064
1064
  * Optional reason for the approval or denial.
1065
+ *
1066
+ * For denied tool calls, the reason is included in the `execution-denied`
1067
+ * tool result that is sent to the model. For approved tool calls that are
1068
+ * executed by the SDK, the reason remains in the message history: it is not
1069
+ * included in the model prompt and is not exposed through a dedicated tool
1070
+ * execution option. For provider-executed tools, the approval response
1071
+ * (including the reason) is forwarded to the provider.
1065
1072
  */
1066
1073
  reason?: string;
1067
1074
  /**
package/dist/index.js CHANGED
@@ -954,7 +954,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
954
954
  }
955
955
 
956
956
  // src/version.ts
957
- var VERSION = true ? "4.0.57" : "0.0.0-test";
957
+ var VERSION = true ? "4.0.58" : "0.0.0-test";
958
958
 
959
959
  // src/get-from-api.ts
960
960
  var getOriginalFetch = () => globalThis.fetch;
package/dist/index.mjs CHANGED
@@ -848,7 +848,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
848
848
  }
849
849
 
850
850
  // src/version.ts
851
- var VERSION = true ? "4.0.57" : "0.0.0-test";
851
+ var VERSION = true ? "4.0.58" : "0.0.0-test";
852
852
 
853
853
  // src/get-from-api.ts
854
854
  var getOriginalFetch = () => globalThis.fetch;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/provider-utils",
3
- "version": "4.0.57",
3
+ "version": "4.0.58",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -16,6 +16,13 @@ export type ToolApprovalResponse = {
16
16
 
17
17
  /**
18
18
  * Optional reason for the approval or denial.
19
+ *
20
+ * For denied tool calls, the reason is included in the `execution-denied`
21
+ * tool result that is sent to the model. For approved tool calls that are
22
+ * executed by the SDK, the reason remains in the message history: it is not
23
+ * included in the model prompt and is not exposed through a dedicated tool
24
+ * execution option. For provider-executed tools, the approval response
25
+ * (including the reason) is forwarded to the provider.
19
26
  */
20
27
  reason?: string;
21
28