fix - return in LITELLM_EXCEPTION_TYPES

This commit is contained in:
Ishaan Jaff 2024-06-01 17:05:33 -07:00
parent 5236701d21
commit a485b19215

View file

@ -2295,6 +2295,10 @@ class Router:
healthy_deployments=_healthy_deployments, healthy_deployments=_healthy_deployments,
) )
time.sleep(_timeout) time.sleep(_timeout)
if type(original_exception) in litellm.LITELLM_EXCEPTION_TYPES:
original_exception.max_retries = num_retries
original_exception.num_retries = current_attempt
raise original_exception raise original_exception
### HELPER FUNCTIONS ### HELPER FUNCTIONS