-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: usage-based-routing-v2 router retry logic doesn't respect retry_after
or do backoff causing immediate failure
#7669
Labels
bug
Something isn't working
Comments
v.155.12 logs with expected behavior.
|
logs for v1.57.5 with unexpected behavior. Truncated because wouldn't fit.:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
When using usage-based-routing-v2 router retry logic doesn't do any backoff for rate limit errors and ignores all router settings for retries such as
retry_after
. All retries happen immediatly and fail because it's aRateLimitError
. Expected behavior is that there would be exponential backoff (as mentioned in the docs here) or it would use the information in theRateLimitError
header to set the retry logic (mentioned here in theretry_after
setting). Previous behaviorv1.55.12
appears to use the rate limit header to set the wait to 60 seconds, I included logs for both the good and bad behavior. I've tested different versions and the immediate retry behavior appears inv1.56.2
.The test configuration is shown bellow, and I attached the logs for
v1.57.5
with the incorrect behavior in relevant log output field and the logs forv1.55.12
which has the expected behavior. The command was run.litellm --config ./scratch/test.yaml --detailed_debug
Test code:
At a minimum I would expect the retry logic to at least follow the
retry_after
flag in the config. Ideally it would respect the information in the RateLimitError to retry after x time.Let me know if you need any more information, and how we can help.
Relevant log output
Attached as comments because I errors that the comment was too long.
Are you a ML Ops Team?
Yes
What LiteLLM version are you on ?
v1.57.5
Twitter / LinkedIn details
The text was updated successfully, but these errors were encountered: