@ai-sdk/provider-utils 5.0.16 → 5.0.17

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
+ ## 5.0.17
4
+
5
+ ### Patch Changes
6
+
7
+ - fa95504: feat(ai): support experimental tool callers in ToolLoopAgent
8
+
3
9
  ## 5.0.16
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -2609,7 +2609,6 @@ interface ToolCall<NAME extends string, INPUT> {
2609
2609
  dynamic?: boolean;
2610
2610
  }
2611
2611
 
2612
- declare const toolCallerSymbol: unique symbol;
2613
2612
  type ToolCallerDefinition = {
2614
2613
  type: 'local';
2615
2614
  bind: (tools: ToolSet) => Tool;
@@ -2618,7 +2617,7 @@ type ToolCallerDefinition = {
2618
2617
  prepareProviderOptions: (providerOptions: ProviderOptions | undefined) => ProviderOptions;
2619
2618
  };
2620
2619
  type ToolCallerTool<TOOL extends Tool = Tool> = TOOL & {
2621
- readonly [toolCallerSymbol]: ToolCallerDefinition;
2620
+ readonly experimental_toolCaller: ToolCallerDefinition;
2622
2621
  };
2623
2622
  declare function toolCaller<TOOL extends Tool>(tool: TOOL, definition: ToolCallerDefinition): ToolCallerTool<TOOL>;
2624
2623
  declare function getToolCaller(tool: Tool | undefined): ToolCallerDefinition | undefined;
package/dist/index.js CHANGED
@@ -1294,7 +1294,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
1294
1294
  }
1295
1295
 
1296
1296
  // src/version.ts
1297
- var VERSION = true ? "5.0.16" : "0.0.0-test";
1297
+ var VERSION = true ? "5.0.17" : "0.0.0-test";
1298
1298
 
1299
1299
  // src/get-from-api.ts
1300
1300
  var getOriginalFetch = () => globalThis.fetch;
@@ -4015,14 +4015,13 @@ async function* executeTool({
4015
4015
  }
4016
4016
 
4017
4017
  // src/types/tool-caller.ts
4018
- var toolCallerSymbol = /* @__PURE__ */ Symbol.for("vercel.ai.experimental.toolCaller");
4019
4018
  function toolCaller(tool2, definition) {
4020
- return Object.defineProperty({ ...tool2 }, toolCallerSymbol, {
4019
+ return Object.defineProperty({ ...tool2 }, "experimental_toolCaller", {
4021
4020
  value: definition
4022
4021
  });
4023
4022
  }
4024
4023
  function getToolCaller(tool2) {
4025
- return tool2 == null ? void 0 : tool2[toolCallerSymbol];
4024
+ return tool2 == null ? void 0 : tool2.experimental_toolCaller;
4026
4025
  }
4027
4026
 
4028
4027
  // src/index.ts