From 283da839a3a3032d66e7cf661d5a96f90ef87089 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 26 May 2026 22:06:51 +0000 Subject: [PATCH] fix: increment sequence number in create_output_item_done_event Co-authored-by: Yassin Kortam --- .../litellm_completion_transformation/streaming_iterator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litellm/responses/litellm_completion_transformation/streaming_iterator.py b/litellm/responses/litellm_completion_transformation/streaming_iterator.py index 4637cea0817..fb28468bf8c 100644 --- a/litellm/responses/litellm_completion_transformation/streaming_iterator.py +++ b/litellm/responses/litellm_completion_transformation/streaming_iterator.py @@ -659,10 +659,11 @@ class LiteLLMCompletionStreamingIterator(ResponsesAPIStreamingIterator): response_annotations = LiteLLMCompletionResponsesConfig._transform_chat_completion_annotations_to_response_output_annotations( annotations=annotations ) + self._sequence_number += 1 return OutputItemDoneEvent( type=ResponsesAPIStreamEvents.OUTPUT_ITEM_DONE, output_index=0, - sequence_number=1, + sequence_number=self._sequence_number, item=BaseLiteLLMOpenAIResponseObject( **{ "id": self._cached_item_id,