mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-10-27 21:50:36 +00:00
* feat(community): migrate infoquest client to httpx.AsyncClient Replace blocking sync requests.post calls with httpx.AsyncClient in the InfoQuest community tool, as tracked in backend/docs/TODO.md planned features. fetch/web_search/image_search and their raw-results helpers are now async, keeping the 30s transport timeout and external behavior (return values, error strings) unchanged. The langchain tool wrappers in infoquest/tools.py become async functions; web_fetch offloads readability extraction to a thread (same pattern as the already-migrated jina_ai tool). Tests are updated to mock httpx.AsyncClient instead of requests.post. * test(community): use AsyncMock for infoquest fetch in relative-links test The infoquest web_fetch_tool now awaits client.fetch, so the test stub must return an awaitable instead of a sync lambda. * fix(community): follow InfoQuest API redirects like the sync client did Address the review note on #5782: requests.post follows redirects by default while httpx.AsyncClient defaults to follow_redirects=False, so a 3xx answer from the reader/search endpoints would have surfaced as 'Error: fetch API returned status 30x' (or fallen into the generic error path after raise_for_status) instead of the final content. All three AsyncClient call sites now pass follow_redirects=True. Adds regression tests asserting each client is constructed with follow_redirects=True, and documents the parity in the test contract. * test(community): fix InfoQuest mock endpoint typo