From 8bf282bb56dce87e99f13da9f51312a91d3ef9cb Mon Sep 17 00:00:00 2001 From: Osamaali313 Date: Fri, 10 Jul 2026 23:44:36 +0300 Subject: [PATCH] fix(deep_research): join chapter body with real newline report_read_chapter joined the chapter body lines with the literal 2-character string "\n" instead of a newline, so the tool returned text with visible \n markers and no line breaks. _read_report_lines uses str.splitlines() (newlines stripped), and every sibling re-joins with "\n" (_save_report, report_outline); only this function used "\n". Use a real newline so multi-line chapters render correctly. --- functions/function_calling/deep_research.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/function_calling/deep_research.py b/functions/function_calling/deep_research.py index ea9d1b0237..f8108131e8 100755 --- a/functions/function_calling/deep_research.py +++ b/functions/function_calling/deep_research.py @@ -271,7 +271,7 @@ def report_read_chapter( # Return content (excluding header) # start is the header line, so start+1 - return "\\n".join(lines[start+1:end]) + return "\n".join(lines[start+1:end]) def report_outline(