Skip to content

Conversation

@wantbook-book
Copy link

Issue resolved by this Pull Request:
Resolves #2465

Introduced a reusable retry-enabled HTTP helper (docling.utils.http_client) and refactored all existing remote requests calls 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:

  • Documentation has been updated, if necessary.
  • Examples have been added, if necessary.
  • Tests have been added, if necessary.

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.
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.
@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2025

DCO Check Failed

Hi @wantbook-book, your pull request has failed the Developer Certificate of Origin (DCO) check.

This repository supports remediation commits, so you can fix this without rewriting history — but you must follow the required message format.


🛠 Quick Fix: Add a remediation commit

Run this command:

git commit --allow-empty -s -m "DCO Remediation Commit for akai <[email protected]>

I, akai <[email protected]>, hereby add my Signed-off-by to this commit: 51c66ae2cb98e3324e0edade364daae04af91d30
I, akai <[email protected]>, hereby add my Signed-off-by to this commit: 2144e015a59ea59def8db90ecb9cfd2c5b24ce64"
git push

🔧 Advanced: Sign off each commit directly

For the latest commit:

git commit --amend --signoff
git push --force-with-lease

For multiple commits:

git rebase --signoff origin/main
git push --force-with-lease

More info: DCO check report

@dosubot
Copy link

dosubot bot commented Dec 6, 2025

Related Documentation

Checked 5 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@mergify
Copy link

mergify bot commented Dec 6, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@wantbook-book wantbook-book changed the title #2465 Feature retry feat(retry): add retry feature Dec 6, 2025
@wantbook-book
Copy link
Author

DCO Check Failed

Hi @wantbook-book, your pull request has failed the Developer Certificate of Origin (DCO) check.

This repository supports remediation commits, so you can fix this without rewriting history — but you must follow the required message format.

🛠 Quick Fix: Add a remediation commit

Run this command:

git commit --allow-empty -s -m "DCO Remediation Commit for akai <[email protected]>

I, akai <[email protected]>, hereby add my Signed-off-by to this commit: 51c66ae2cb98e3324e0edade364daae04af91d30
I, akai <[email protected]>, hereby add my Signed-off-by to this commit: 2144e015a59ea59def8db90ecb9cfd2c5b24ce64"
git push

🔧 Advanced: Sign off each commit directly
For the latest commit:

git commit --amend --signoff
git push --force-with-lease

For multiple commits:

git rebase --signoff origin/main
git push --force-with-lease

More info: DCO check report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

implement retry strategy for remote calls

1 participant