mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-13 08:52:02 +00:00
test(proxy): stop pinning the Responses stream terminator in the fallback metadata test
Main ends Responses streams without data: [DONE] since #47980, so the test reads the event frames whether or not a terminator follows them, and passes both before and after that change merges
This commit is contained in:
parent
63a07248e6
commit
8207f98112
1 changed files with 1 additions and 2 deletions
|
|
@ -939,13 +939,12 @@ async def test_responses_stream_sends_fallback_metadata_as_a_typed_event_framed_
|
|||
)
|
||||
]
|
||||
)
|
||||
event_frames: Final = frames[:-1]
|
||||
event_frames: Final = tuple(frame for frame in frames if frame != "data: [DONE]\n\n")
|
||||
payloads: Final = tuple(
|
||||
json.loads(next(line.removeprefix("data: ") for line in frame.splitlines() if line.startswith("data: ")))
|
||||
for frame in event_frames
|
||||
)
|
||||
|
||||
assert frames[-1] == "data: [DONE]\n\n"
|
||||
assert tuple(payload.get("type") for payload in payloads) == (
|
||||
"response.created",
|
||||
"litellm.fallback_metadata",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue