diff --git a/backend/open_webui/utils/middleware.py b/backend/open_webui/utils/middleware.py index 9dbbc280eb..a13f43193d 100644 --- a/backend/open_webui/utils/middleware.py +++ b/backend/open_webui/utils/middleware.py @@ -775,7 +775,8 @@ def handle_responses_streaming_event( response_data = data.get('response', {}) final_output = response_data.get('output') - new_output = final_output if final_output is not None else current_output + # Some providers send an empty output on response.completed despite having streamed items + new_output = final_output if final_output else current_output # Ensure reasoning items are marked as completed in the final output if new_output: