@ai-sdk/provider-utils 4.0.57 → 4.0.59

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,17 @@
1
1
  # @ai-sdk/provider-utils
2
2
 
3
+ ## 4.0.59
4
+
5
+ ### Patch Changes
6
+
7
+ - d5e7d82: fix(provider-utils): keep case-sensitive url paths and query values
8
+
9
+ ## 4.0.58
10
+
11
+ ### Patch Changes
12
+
13
+ - 604b4d3: docs(provider-utils): clarify how `ToolApprovalResponse.reason` is handled for approved and denied tool calls
14
+
3
15
  ## 4.0.57
4
16
 
5
17
  ### 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.59" : "0.0.0-test";
958
958
 
959
959
  // src/get-from-api.ts
960
960
  var getOriginalFetch = () => globalThis.fetch;
@@ -1076,7 +1076,6 @@ function isUrlSupported({
1076
1076
  url,
1077
1077
  supportedUrls
1078
1078
  }) {
1079
- url = url.toLowerCase();
1080
1079
  mediaType = mediaType.toLowerCase();
1081
1080
  return Object.entries(supportedUrls).map(([key, value]) => {
1082
1081
  const mediaType2 = key.toLowerCase();