-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Fix issue #4480: '[Bug]: Being blocked by cloudflare results in futile retries #4482
Conversation
@neubig maybe this might be worthwhile looking into: an idea on how to handle this with the help of the existing Q: How could the "retry_decorator" be enhanced to specify a list of exception types, that should NOT be retried, even if the base exception is part of one in the "retry_exceptions" list. Enhancing
|
Thanks @tobitege! That makes sense, but do you think it should be done in this PR or saved for a future one? My sense is that the current fix is reasonably good, and we can always improve it later. |
Sure thing, let me move the idea into a new issue for potential tracking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Toby's suggestion may be worth adding a second PR for.
Argh, this was going to happen. We have re-introduced retries on APIError here:
Other things we can consider IMHO:
|
I think talk to the litellm project to treat 502 separately from the catch-all Send like a good first step! |
End-user friendly description of the problem this fixes or functionality that this introduces
Fixed unlimited retries when queries are blocked by CloudFlare.
Give a summary of what the PR does, explaining any non-trivial design decisions
This PR fixes the fact that OpenHands will perform unlimited retries when a query is blocked by CloudFlare.
Link of any specific issues this addresses
Fixes #4480