@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/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.59",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -18,8 +18,7 @@ export function isUrlSupported({
18
18
  url: string;
19
19
  supportedUrls: Record<string, RegExp[]>;
20
20
  }): boolean {
21
- // standardize media type and url to lower case
22
- url = url.toLowerCase();
21
+ // standardize media type to lower case
23
22
  mediaType = mediaType.toLowerCase();
24
23
 
25
24
  return (
@@ -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