88 _format_fetch_url_description ,
99 _format_shell_description ,
1010 _format_task_description ,
11- _format_web_search_description ,
11+ _format_tavily_search_description ,
12+ _format_parallel_search_description ,
1213 _format_write_file_description ,
1314)
1415
@@ -103,10 +104,10 @@ def test_format_edit_file_description_all_occurrences():
103104 assert "Action: Replace text (all occurrences)" in description
104105
105106
106- def test_format_web_search_description ():
107- """Test web_search description formatting."""
107+ def test_format_tavily_search_description ():
108+ """Test tavily_search description formatting."""
108109 tool_call = {
109- "name" : "web_search " ,
110+ "name" : "tavily_search " ,
110111 "args" : {
111112 "query" : "python async programming" ,
112113 "max_results" : 10 ,
@@ -117,17 +118,17 @@ def test_format_web_search_description():
117118 state = Mock ()
118119 runtime = Mock ()
119120
120- description = _format_web_search_description (tool_call , state , runtime )
121+ description = _format_tavily_search_description (tool_call , state , runtime )
121122
122123 assert "Query: python async programming" in description
123124 assert "Max results: 10" in description
124125 assert "⚠️ This will use Tavily API credits" in description
125126
126127
127- def test_format_web_search_description_default_max_results ():
128- """Test web_search description with default max_results."""
128+ def test_format_tavily_search_description_default_max_results ():
129+ """Test tavily_search description with default max_results."""
129130 tool_call = {
130- "name" : "web_search " ,
131+ "name" : "tavily_search " ,
131132 "args" : {
132133 "query" : "langchain tutorial" ,
133134 },
@@ -137,12 +138,35 @@ def test_format_web_search_description_default_max_results():
137138 state = Mock ()
138139 runtime = Mock ()
139140
140- description = _format_web_search_description (tool_call , state , runtime )
141+ description = _format_tavily_search_description (tool_call , state , runtime )
141142
142143 assert "Query: langchain tutorial" in description
143144 assert "Max results: 5" in description
144145
145146
147+ def test_format_parallel_search_description ():
148+ """Test parallel_search description formatting."""
149+ tool_call = {
150+ "name" : "parallel_search" ,
151+ "args" : {
152+ "objective" : "Learn python async programming" ,
153+ "queries" : ["python async programming" ],
154+ "max_results" : 10 ,
155+ },
156+ "id" : "call-5" ,
157+ }
158+
159+ state = Mock ()
160+ runtime = Mock ()
161+
162+ description = _format_parallel_search_description (tool_call , state , runtime )
163+
164+ assert "Objective: Learn python async programming" in description
165+ assert "Queries: ['python async programming']" in description
166+ assert "Max results: 10" in description
167+ assert "⚠️ This will use Parallel API credits" in description
168+
169+
146170def test_format_fetch_url_description ():
147171 """Test fetch_url description formatting."""
148172 tool_call = {
0 commit comments