mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
fix don't retry errors when no healthy deployments available
This commit is contained in:
parent
5e2f962ba3
commit
fb16ff2335
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