Commit 7df641b

benny-dou <60535774+benny-dou@users.noreply.github.com>
2026-04-15 07:42:30
fix(ai): add success status to web_search tool response
1 parent cbff48e
Changed files (1)
src
ai
src/ai/texts/tool_call.py
@@ -122,7 +122,10 @@ Use the `web_search` tool to access up-to-date information from the web or when
             "progress": kwargs.get("progress") or resp.get("progress"),
         }
     status_msg = kwargs.get("progress") or resp.get("progress")
-    return {"progress": status_msg} if isinstance(status_msg, Message) else {}
+    result: dict = {"progress": status_msg} if isinstance(status_msg, Message) else {}
+    if resp.get("success"):
+        result |= {"success": True}
+    return result
 
 
 def add_search_results(contexts: list[dict], search_results: list[dict]) -> list[dict]: