Bug-fix release addressing three items from the upstream issue tracker plus one found in review.
Fixes
- DeepSeek & Qwen streaming buffered the whole response (upstream #990). Both handlers sent
stream: truein the request body but never set the Guzzlestreamtransport option, so the entire response was buffered in memory before the first event yielded. Now consistent with the other 14 providers. (The Qwen instance was not reported — found while verifying prism-php#990.) - Malformed tool-call JSON crashed with a raw
TypeError(upstream #1006). OpenRouter'sToolCallMapeagerly ranjson_decode()and passed the result straight to theToolCallconstructor; invalid model JSON decoded tonulland threw a rawTypeError. Arguments are now decoded lazily, and a decode failure raises a handledPrismExceptionthat the tool-execution loop turns into a tool result the model can see and recover from.
Feature
- OpenAI
text_verbosity(upstream #1015) now works on structured output and both chat/completions paths — previously it was only wired on the Responses text path.
Tests
7 new/updated tests (1,891 total): OpenRouter tool-call mapping and lazy-decode behavior, verbosity pass-through for structured + chat/completions, and the ToolCall value-object test updated to assert the handled exception.
🤖 Generated with Claude Code