mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-16 04:29:31 +00:00
fix(router): handle empty tools list in stream fallbacks
This commit is contained in:
parent
3deba7a02f
commit
0257c80fb0
1 changed files with 2 additions and 2 deletions
|
|
@ -1994,7 +1994,7 @@ class Router:
|
|||
if (
|
||||
e.is_pre_first_chunk
|
||||
or not e.generated_content
|
||||
or initial_kwargs.get("tools")
|
||||
or initial_kwargs.get("tools") is not None
|
||||
):
|
||||
# Retry with the original messages when:
|
||||
# - no content was generated before the error
|
||||
|
|
@ -2555,7 +2555,7 @@ class Router:
|
|||
if (
|
||||
e.is_pre_first_chunk
|
||||
or not e.generated_content
|
||||
or initial_kwargs.get("tools")
|
||||
or initial_kwargs.get("tools") is not None
|
||||
):
|
||||
initial_kwargs["messages"] = messages
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue