Repository navigation
fix(community): normalize InfoQuest timeout config values like the sibling providers do - #5883
Merged
WillemJiang merged 1 commit intoSep 28, 2026
Conversation
config.example.yaml documents web_fetch timeout/fetch_time/navigation_timeout and the two search_time_range options as seconds, and a $VAR reference resolves verbatim from the environment, so any of them can reach InfoQuestClient as a string. The client compares each with 0, which raises TypeError for a string, None or a mapping and takes the whole web_fetch/web_search/image_search call down. Reuse the provider-local coercion the sibling tools already have: accept an int, integral float or integer-form string, otherwise warn and keep the documented -1 (no filter).
Lesereingrape
marked this pull request as ready for review
September 27, 2026 07:42
WillemJiang
approved these changes
Sep 28, 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.
No linked issue (found by reading the provider against its siblings; steps below reproduce it).
Why
Trigger:
deerflow.community.infoquest.toolsreads five numeric options straight out ofconfig.yamland hands them toInfoQuestClientunvalidated, while every sibling search/fetchprovider that reads a number (
exa._coerce_positive_int,ddg_search._coerce_max_results,serper,sofya,brave,image_search,jina_ai._coerce_timeout) normalizes first.Pain:
config.example.yamldocuments these as seconds —and a
$VARreference in the config is substituted verbatim from the environment(
AppConfig.resolve_env_variables()→os.getenv(...)), so the value that arrives can be astring. The client then compares it with
0:infoquest_client.py:142-147(fetch) —if self.fetch_time > 0:,if self.fetch_timeout > 0:infoquest_client.py:166(web_search) —if self.search_time_range > 0:infoquest_client.py:333-335,:373(image_search) —1 <= self.image_search_time_range <= 365timeout: $FETCH_TIMEOUTtherefore raisesTypeError: '>' not supported between instances of 'str' and 'int'out of the tool, and a blanktimeout:(None) or an unset variable ("") doesthe same. One mistyped line in
config.yamlturnsweb_fetch,web_searchorimage_searchinto a hard failure whose message points at the client instead of the config key.
What changed
From an operator's perspective, the InfoQuest timeouts now behave like the other providers':
3.0), or an integer-form string ("10"," 10 ","-1", andtherefore any
$VARsubstitution) is used as configured and reaches the request as anint;Noneor a wrong type falls back tothe documented
-1(that filter is disabled) and logsInvalid InfoQuest timeout='off'; using default -1;Not touched: the model-visible tool schemas,
image_size(a string option), the 30 s transporttimeout from #5782, and every other provider.
Surface area
web_fetch/web_search/image_searchtool configurationpath (
deerflow.community.infoquest.tools). Only operator-ownedconfig.yamlvalues move, andthey now pass through one validation function before reaching the request builder.
"TypeError out of the tool" to "that filter is disabled and the rejected key is logged".
Nothing changes for a valid config.
Bug fix verification
Test path:
backend/tests/test_infoquest_config_timeout_coercion.py— six functions (19 cases)that pin the values the tool hands to
InfoQuestClient, plus two that pin the outbound crawl andsearch bodies.
Did it go red on
mainand green on this branch? Yes.Red on
main(74f6dce4, these tests against the pristineinfoquest/tools.py):The two that pass on
mainare the integer controls(
test_timeouts_reach_the_client_as_integers[10-10_1]andtest_configured_numbers_keep_their_meaning) — a config that is already anintis exactlythe case that must not change.
Green on this branch:
Offline:
httpx.AsyncClientis patched in every async case, so no request left the machine.Lint/format gate:
A note on how this patch was prepared: it was written and measured by an automated agent
session working for the account owner, on Windows / Python 3.12. The numbers above are its own
measurements, reproduced on
mainand on this branch immediately before opening the PR; theowner has not independently re-run them, so the human-attestation boxes in the template are
left for the owner to confirm rather than being ticked here.