From d2237e494d16fc96c79bf559a839c2ad3206e081 Mon Sep 17 00:00:00 2001 From: Moe Khalil Date: Sat, 31 Oct 2026 21:19:46 +0000 Subject: [PATCH] test(router): end the scripted stream with a finish chunk Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- tests/unit/test_router/core/test_endpoints.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/test_router/core/test_endpoints.py b/tests/unit/test_router/core/test_endpoints.py index a3cffe8278a..b2ad602c4c6 100644 --- a/tests/unit/test_router/core/test_endpoints.py +++ b/tests/unit/test_router/core/test_endpoints.py @@ -414,6 +414,7 @@ def _scripted_stream(*texts: str) -> Callable[..., CustomStreamWrapper]: async def chunks() -> AsyncIterator[ModelResponseStream]: for text in texts: yield ModelResponseStream(choices=[{"index": 0, "delta": {"role": "assistant", "content": text}}]) + yield ModelResponseStream(choices=[{"index": 0, "delta": {}, "finish_reason": "stop"}]) logging_obj: Final = LiteLLMLogging( model="d1",