🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@ai-sdk/provider-utils

Package Overview
Dependencies
Maintainers
3
Versions
318
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/provider-utils - npm Package Compare versions

Comparing version
5.0.5
to
5.0.6
+6
-0
CHANGELOG.md
# @ai-sdk/provider-utils
## 5.0.6
### Patch Changes
- 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.
## 5.0.5

@@ -4,0 +10,0 @@

+1
-1
{
"name": "@ai-sdk/provider-utils",
"version": "5.0.5",
"version": "5.0.6",
"type": "module",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -7,3 +7,2 @@ import {

import { generateId as defaultGenerateId } from './generate-id';
import { isParsableJson } from './parse-json';

@@ -192,7 +191,6 @@ /**

// Check if tool call is complete
// (some providers send the full tool call in one chunk)
if (isParsableJson(toolCall.function.arguments)) {
this.finishToolCall(toolCall);
}
// Tool calls must not finalize before the stream ends: a parsable
// argument buffer can still be the prefix of a longer argument string,
// so acting on it early would use truncated inputs (see #13137).
// Finalization happens in flush().
}

@@ -216,7 +214,2 @@

}
// Check if tool call is complete
if (isParsableJson(toolCall.function.arguments)) {
this.finishToolCall(toolCall);
}
}

@@ -223,0 +216,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display