mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-10-26 21:26:39 +00:00
* refactor(community): give max_results coercion a single owner #5865 audited every bundled provider's max_results coercion, and #5866 / #5867 are fixing seven copies of it. Each one had to be read on its own because four of the copies were byte-identical apart from the provider label in their warning line. Move the shared bar into deerflow.community.search_max_results and have ddg_search, image_search, fastcrw and firecrawl delegate to it. Warnings keep their existing text and their existing logger: logger is a parameter so records keep their module attribution, which tests/test_ddg_search_tools.py filters on. image_search also stops spelling its own default twice -- the two tool signatures hardcoded 5 while the same file defined DEFAULT_MAX_RESULTS. No bound is added to any provider, and brave / groundroute / serper / serply / sofya / tencent_wsa are left untouched so #5866 and #5867 land without conflict. The new test pins the 13-value behaviour, the delegation and the historical labels, and asserts that the set of providers still hand-rolling a coercer is exactly the declared six -- so a twelfth copy fails CI rather than being audited by hand later. * test(search): cover generic and inline max-results coercion --------- Co-authored-by: Willem Jiang <willem.jiang@gmail.com>