fix(link-understanding): honor global or largest model timeout for link fetches#100731
Merged
steipete merged 1 commit intoJul 6, 2026
Merged
Conversation
Contributor
|
Maintainer verification complete.
Prepared head: |
Contributor
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 7, 2026
giodl73-repo
pushed a commit
to giodl73-repo/openclaw
that referenced
this pull request
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Fixes #100660.
In
runLinkUnderstanding()(src/link-understanding/runner.ts), the HTTP fetch timeout for every link was resolved fromentries[0]only. If later model entries had largertimeoutSeconds, the fetch could still time out using the first entry's shorter window. The fetch phase is independent of any single CLI execution, so it should use either an explicit global link-tools timeout or the largest configured model timeout.Why This Change Was Made
Introduced
resolveFetchTimeoutMsFromConfig()which:tools.links.timeoutSecondswhen it is explicitly configured.Math.max(...)across all configured model timeouts so slower entries are not capped by the first one.The timeout is now computed once per call instead of once per URL.
User Impact
Link-understanding fetches no longer fail prematurely when the first configured model has a shorter timeout than later models. Users who set a global
tools.links.timeoutSecondsget predictable fetch timeouts independent of model ordering.Evidence
Added two regression tests in
src/link-understanding/runner.test.tsthat both fail on currentmain:tools.links.timeoutSeconds: 15and model timeouts1and9, the fetch must use15000ms. Onmainit uses1000ms.1and9, the fetch must use9000ms. Onmainit uses1000ms.All six tests in the file pass.