Files
Dmitry Ng 5835a5ab5a fix: cache tool call names in streaming to handle providers with incomplete chunks
- Added toolCallNameCache map in combineStreamingChatResponse to store tool call names by ID
- Modified updateToolCall to accept nameCache parameter and restore missing names from cache
- Fixed streaming callback errors when providers omit function names in subsequent chunks (e.g., GPT-4.1 via OpenRouter)
- Added unit tests for name caching logic covering first chunk caching and subsequent chunk restoration
- Added integration tests for different streaming formats (GPT-4 style multi-chunk, Gemini style single-chunk, parallel tool calls)

This ensures streaming tool calls work correctly with all provider formats, including those that send function names only in the first chunk.
2026-03-15 18:48:26 +03:00
..
2025-06-22 02:27:21 +03:00