mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
fix(router): preserve deployment retry budget with policy
This commit is contained in:
parent
8d0cd8a37f
commit
a682ac09ae
1 changed files with 4 additions and 1 deletions
|
|
@ -6703,7 +6703,10 @@ class Router:
|
|||
# Check retry policy FIRST, before should_retry_this_error
|
||||
# This allows retry policies to override the healthy deployments check
|
||||
_retry_policy_applies = False
|
||||
if self.retry_policy is not None or model_group_retry_policy is not None:
|
||||
if (
|
||||
deployment_num_retries is None
|
||||
and (self.retry_policy is not None or model_group_retry_policy is not None)
|
||||
):
|
||||
# get num_retries from retry policy
|
||||
# Use the model_group captured at the start of the function, or get it from metadata
|
||||
# kwargs.get("model") at this point is the deployment model, not the model_group
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue