Skip to content

v0.7.2 - Streaming & Tool Use Bug Fixes

Choose a tag to compare

@dalehurley dalehurley released this 17 May 09:23
· 2 commits to main since this release

Bug Fixes

#2 — True chunked streaming (events no longer arrive all at once)

Guzzle's PSR-18 sendRequest() blocks until curl_exec() finishes and the full response body is buffered before returning, making streaming responses appear to arrive all at once. postStream() now uses Guzzle's native send() with ['stream' => true], keeping the curl socket open and delivering SSE events to the caller incrementally as they arrive.

#3 — Array to string conversion warning in MessageStreamManager

The Anthropic API sends "input": {} in content_block_start for tool_use blocks, which PHP decodes as an empty array []. Concatenating input_json_delta partial JSON strings onto that array triggered a PHP warning and silently lost the accumulated input. input is now initialised as '' for tool_use blocks and decoded back to a PHP array on content_block_stop.