Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: Fix headline generation for news searches

LearningCircuitf6fcf2deae02
diff --git a/src/local_deep_research/news/subscription_manager/scheduler.py b/src/local_deep_research/news/subscription_manager/scheduler.py
index 627211db72..0cff10e594 100644
--- a/src/local_deep_research/news/subscription_manager/scheduler.py
+++ b/src/local_deep_research/news/subscription_manager/scheduler.py
@@ -660,6 +660,9 @@ class NewsScheduler:
report_content = serializable_result.get(
"report"
) or serializable_result.get("summary")
+ logger.debug(
+ f"Report content length: {len(report_content) if report_content else 0} chars"
+ )
# Extract sources/links from the result
sources = serializable_result.get("sources", [])
diff --git a/src/local_deep_research/news/utils/headline_generator.py b/src/local_deep_research/news/utils/headline_generator.py
index 0b2c0c2a30..6f95bbee37 100644
--- a/src/local_deep_research/news/utils/headline_generator.py
+++ b/src/local_deep_research/news/utils/headline_generator.py
@@ -42,10 +42,14 @@ def _generate_with_llm(
# Focus only on the findings/report content, not the query
if not findings:
+ logger.debug("No findings provided for headline generation")
return None
# Use the COMPLETE findings - no character limit
findings_preview = findings
+ logger.debug(
+ f"Generating headline with {len(findings)} chars of findings"
+ )
prompt = f"""Generate a comprehensive news headline that captures the key events from the research report below.
diff --git a/src/local_deep_research/web/services/research_service.py b/src/local_deep_research/web/services/research_service.py
index 1237ea1423..2390d926cc 100644
--- a/src/local_deep_research/web/services/research_service.py
+++ b/src/local_deep_research/web/services/research_service.py
@@ -1001,10 +1001,8 @@ def run_research_process(
report_data = cached_research.get_report(
research_id
)
- if report_data and report_data.get(
- "content"
- ):
- report_content = report_data["content"]
+ if report_data:
+ report_content = report_data
logger.info(
f"Retrieved {len(report_content)} chars from database for headline generation"
)