From 28428a53d1fe051adf38d6f89926e201386c46ea Mon Sep 17 00:00:00 2001 From: floating21 <15998581+floating21@user.noreply.gitee.com> Date: Wed, 25 Feb 2026 22:35:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86=20DeepAgent=20=E7=9A=84?= =?UTF-8?q?=E6=96=AD=E8=A8=80=E6=94=B9=E4=B8=BA=E8=AD=A6=E5=91=8A=EF=BC=8C?= =?UTF-8?q?=E4=BD=BF=E5=85=B6=E5=9C=A8=E6=B2=A1=E6=9C=89=20Tavily=20Key=20?= =?UTF-8?q?=E6=97=B6=E4=B9=9F=E8=83=BD=E5=8A=A0=E8=BD=BD=E5=87=BA=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E4=BD=93=E9=80=89=E9=A1=B9=E5=B9=B6=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/agents/deep_agent/graph.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/agents/deep_agent/graph.py b/src/agents/deep_agent/graph.py index 460e7952f..1a6c89e2c 100644 --- a/src/agents/deep_agent/graph.py +++ b/src/agents/deep_agent/graph.py @@ -18,7 +18,7 @@ from .context import DeepContext from .prompts import DEEP_PROMPT - +from src.utils import logger def _get_research_sub_agent(search_tools: list) -> dict: """Get research sub-agent config with search tools.""" @@ -85,11 +85,14 @@ async def get_tools(self): if tavily_search: tools.append(tavily_search) - # Assert that search tool is available for DeepAgent - assert tools, ( - "DeepAgent requires at least one search tool. " - "Please configure TAVILY_API_KEY environment variable to enable web search." - ) + # # Assert that search tool is available for DeepAgent + # assert tools, ( + # "DeepAgent requires at least one search tool. " + # "Please configure TAVILY_API_KEY environment variable to enable web search." + # ) + if not tools: + logger.warning("No search tools configured, DeepAgent will work without web search") + tools = [] return tools async def get_graph(self, **kwargs):