Patch Changes
-
45b3d76: fix(security): prevent streaming tool calls from finalizing on parsable partial JSON
Streaming tool call arguments were finalized using
isParsableJson()as a heuristic for completion. If partial accumulated JSON happened to be valid JSON before all chunks arrived, the tool call would be executed with incomplete arguments. Tool call finalization now only occurs inflush()after the stream is fully consumed.