mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix don't retry errors when no healthy deployments available
This commit is contained in:
parent
19c3a82d1b
commit
e28b240a5b
2 changed files with 64 additions and 0 deletions
|
@ -2727,6 +2727,11 @@ class Router:
|
|||
if _num_healthy_deployments <= 0: # if no healthy deployments
|
||||
raise error # then raise error
|
||||
|
||||
# Do not retry if there are no healthy deployments
|
||||
# just raise the error
|
||||
if _num_healthy_deployments <= 0: # if no healthy deployments
|
||||
raise error
|
||||
|
||||
return True
|
||||
|
||||
def function_with_fallbacks(self, *args, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue