feat(retry): add retry feature#2740
feat(retry): add retry feature#2740wantbook-book wants to merge 5 commits intodocling-project:mainfrom
Conversation
Introduce docling.utils.http_client with a retry-configured Session and helper so remote calls share the same backoff settings. Refactor image download, API image requests, and HTML backend remote fetches to use the helper, enabling consistent retries for both sync and streaming paths without changing call sites’ behavior. Signed-off-by: akai <2780896955@qq.com>
Update docling.utils.http_client to type status_forcelist as Collection[int] in the retry builder/session helper so it matches the requests.Retry signature. Signed-off-by: akai <2780896955@qq.com>
|
✅ DCO Check Passed Thanks @wantbook-book, all your commits are properly signed off. 🎉 |
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
@wantbook-book Many thanks for the effort, this looks definitely useful. However, some tests are failing. Could you please review those? To run locally: |
|
I ran Do you have any suggestions for how to fix this? |
@cau-git Do you have any suggestions? |
Issue resolved by this Pull Request:
Resolves #2465
Introduced a reusable retry-enabled HTTP helper (
docling.utils.http_client) and refactored all existing remoterequestscalls to use it. This makes download helpers, HTML backend image fetches, and OpenAI-compatible image requests more resilient to transient errors and rate limiting without duplicating retry configuration.Checklist: