mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-11-20 03:10:34 +00:00
* fix(capabilities): build the business client off the MCP event loop `BusinessClient._request` constructed `httpx.AsyncClient()` inline whenever no client was injected, which is every production call: `build_server` mints a client per tool invocation for the bundled dingtalk, wecom and HubSpot tools. `httpx.AsyncClient()` runs `ssl.create_default_context(cafile=certifi...)` in its constructor, so each notification and CRM request loaded the CA bundle on the event loop it was serving. Construct it through `asyncio.to_thread`, the rule the community fetch clients already follow (crawl4ai, browserless, groundroute), and add the per-client `tests/blocking_io` regression the family carries so the inline construction cannot come back unnoticed. * Enhance cancellation safety for HTTP client in business.py Refactor HTTP client construction for cancellation safety and ensure proper closure. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Willem Jiang <willem.jiang@gmail.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>