mirror of
https://github.com/vxcontrol/langchaingo.git
synced 2026-07-15 11:25:39 -04:00
5835a5ab5a
- 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.