mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
fix(responses): start synthetic stream sequence numbers at 1
Co-authored-by: Yassin Kortam <yassin@berri.ai>
This commit is contained in:
parent
3b3da793da
commit
7f52f18118
1 changed files with 1 additions and 1 deletions
|
|
@ -1218,7 +1218,7 @@ def _build_synthetic_response_events(
|
|||
# event types now declare `sequence_number: int = 0` (default), which
|
||||
# would otherwise serialize as 0 for most events and break the strict
|
||||
# monotonic ordering guarantee expected by some Responses API clients.
|
||||
for idx, event in enumerate(events):
|
||||
for idx, event in enumerate(events, start=1):
|
||||
try:
|
||||
event.sequence_number = idx
|
||||
except (AttributeError, ValueError):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue