@ai-sdk/provider-utils 5.0.5 → 5.0.6

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.6
4
+
5
+ ### Patch Changes
6
+
7
+ - ac306ed: Fix `StreamingToolCallTracker` finalizing streaming tool calls on parsable partial JSON. Tool calls now only finalize during stream flush, restoring the behavior of #13137: a parsable argument buffer can still be the prefix of a longer argument string, so finalizing early could act on truncated tool inputs.
8
+
3
9
  ## 5.0.5
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -971,7 +971,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
971
971
  }
972
972
 
973
973
  // src/version.ts
974
- var VERSION = true ? "5.0.5" : "0.0.0-test";
974
+ var VERSION = true ? "5.0.6" : "0.0.0-test";
975
975
 
976
976
  // src/get-from-api.ts
977
977
  var getOriginalFetch = () => globalThis.fetch;
@@ -3438,9 +3438,6 @@ var StreamingToolCallTracker = class {
3438
3438
  delta: toolCall.function.arguments
3439
3439
  });
3440
3440
  }
3441
- if (isParsableJson(toolCall.function.arguments)) {
3442
- this.finishToolCall(toolCall);
3443
- }
3444
3441
  }
3445
3442
  processExistingToolCall(index, toolCallDelta) {
3446
3443
  var _a2;
@@ -3456,9 +3453,6 @@ var StreamingToolCallTracker = class {
3456
3453
  delta: toolCallDelta.function.arguments
3457
3454
  });
3458
3455
  }
3459
- if (isParsableJson(toolCall.function.arguments)) {
3460
- this.finishToolCall(toolCall);
3461
- }
3462
3456
  }
3463
3457
  finishToolCall(toolCall) {
3464
3458
  var _a2, _b2;