You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Split tool_calls status into multiple chunks for proper Open WebUI display
OpenAI streaming format requires tool calls to be sent across multiple chunks:
1. First chunk: id, type, function name with empty arguments
2. Second chunk: function arguments only
This matches OpenAI's actual streaming behavior where tool_calls are
accumulated incrementally, fixing the display issue in Open WebUI where
the status was showing as empty JSON.
Changes:
- Rename createStatusToolCallChunk -> createStatusToolCallChunks (returns array)
- First chunk contains metadata (id, type, name) with arguments: ''
- Second chunk contains only arguments field
- Both chunks share same chat ID and timestamp
- Update streamingHandler to send both chunks sequentially
- Update all tests to match new multi-chunk format
All 427 tests passing.
0 commit comments