fix: Stream chunks normally, only add tool call chunk at end
Instead of collecting all chunks and sending a modified response: - Stream chunks normally as they come (with deltas like before) - Only at the END, if tool call pattern detected, send additional chunk with tool_calls - Then send final chunk with usage statistics This preserves the original streaming behavior while adding tool call detection.
Showing
Please
register
or
sign in
to comment