fix(mcp): set sequence_number on mcp_call output_item.done event

create_mcp_call_events relied on OutputItemDoneEvent's default
sequence_number, which was previously 1 but is now 0. Pass an
explicit value so the event matches the streaming sequence order
emitted by the surrounding MCP call events.
This commit is contained in:
mateo-berri 2026-05-27 00:45:29 +00:00
parent 0460593466
commit f1c33c4d1c
No known key found for this signature in database

View file

@ -218,6 +218,7 @@ def create_mcp_call_events(
output_item_done_event = OutputItemDoneEvent(
type=ResponsesAPIStreamEvents.OUTPUT_ITEM_DONE,
output_index=0,
sequence_number=sequence_start + 4,
item=BaseLiteLLMOpenAIResponseObject(
**{
"id": item_id,