From 137cf94878a2410c607005ba875179d9b9f15f4b Mon Sep 17 00:00:00 2001 From: michal Date: Fri, 20 Feb 2026 07:41:59 +0100 Subject: [PATCH] fix(web): send fetched content to LLM instead of summary metadata web_fetch was returning only a short metadata string to the LLM ("Fetched N bytes from ..."), so the model never saw the actual page content and fell back to hallucinated answers. Now ForLLM carries the full JSON payload (url, status, text) so the model reasons on real fetched data. --- pkg/tools/web.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/tools/web.go b/pkg/tools/web.go index 1f5c58ea5a..65c8c37df2 100644 --- a/pkg/tools/web.go +++ b/pkg/tools/web.go @@ -477,7 +477,7 @@ func (t *WebFetchTool) Execute(ctx context.Context, args map[string]interface{}) resultJSON, _ := json.MarshalIndent(result, "", " ") return &ToolResult{ - ForLLM: fmt.Sprintf("Fetched %d bytes from %s (extractor: %s, truncated: %v)", len(text), urlStr, extractor, truncated), + ForLLM: string(resultJSON), ForUser: string(resultJSON), } }