mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-15 09:12:18 +00:00
test(router): end the scripted stream with a finish reason
Since #47665 a stream that ends without a finish_reason raises MidStreamFallbackError; the core suite's scripted stream never sent one, so test_streaming_acompletion_yields_the_host_stream_chunks_with_routing_hidden_params fails on main for both cores.
This commit is contained in:
parent
6375c5b1a3
commit
eabbbc41e7
1 changed files with 2 additions and 0 deletions
|
|
@ -414,6 +414,8 @@ 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}}])
|
||||
# A stream that ends without a finish reason fails since #47665.
|
||||
yield ModelResponseStream(choices=[{"index": 0, "delta": {}, "finish_reason": "stop"}])
|
||||
yield ModelResponseStream(choices=[{"index": 0, "delta": {}, "finish_reason": "stop"}])
|
||||
|
||||
logging_obj: Final = LiteLLMLogging(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue