fix: increment sequence number in create_output_item_done_event

Co-authored-by: Yassin Kortam <yassin@berri.ai>
This commit is contained in:
Cursor Agent 2026-05-26 22:06:51 +00:00
parent 6a0fab4498
commit 283da839a3
No known key found for this signature in database

View file

@ -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,