ai 5.0.215 → 5.0.216

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,14 @@
1
1
  # ai
2
2
 
3
+ ## 5.0.216
4
+
5
+ ### Patch Changes
6
+
7
+ - 2fd6076: fix(ai): call `onInputStart` before `onInputAvailable` during non-streaming tool calls
8
+ - Updated dependencies [2fd6076]
9
+ - @ai-sdk/provider-utils@3.0.30
10
+ - @ai-sdk/gateway@2.0.115
11
+
3
12
  ## 5.0.215
4
13
 
5
14
  ### Patch Changes
package/dist/index.js CHANGED
@@ -778,7 +778,7 @@ function detectMediaType({
778
778
  var import_provider_utils2 = require("@ai-sdk/provider-utils");
779
779
 
780
780
  // src/version.ts
781
- var VERSION = true ? "5.0.215" : "0.0.0-test";
781
+ var VERSION = true ? "5.0.216" : "0.0.0-test";
782
782
 
783
783
  // src/util/download/download.ts
784
784
  var download = async ({
@@ -2474,6 +2474,14 @@ async function generateText({
2474
2474
  continue;
2475
2475
  }
2476
2476
  const tool2 = tools[toolCall.toolName];
2477
+ if (tool2.onInputStart != null) {
2478
+ await tool2.onInputStart({
2479
+ toolCallId: toolCall.toolCallId,
2480
+ messages: stepInputMessages,
2481
+ abortSignal,
2482
+ experimental_context
2483
+ });
2484
+ }
2477
2485
  if ((tool2 == null ? void 0 : tool2.onInputAvailable) != null) {
2478
2486
  await tool2.onInputAvailable({
2479
2487
  input: toolCall.input,