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: Use correct API endpoint for fetching research reports

LearningCircuitc1774a063e7f
diff --git a/src/local_deep_research/web/routes/research_routes.py b/src/local_deep_research/web/routes/research_routes.py
index e0666f9ae1..5158b73f05 100644
--- a/src/local_deep_research/web/routes/research_routes.py
+++ b/src/local_deep_research/web/routes/research_routes.py
@@ -1070,21 +1070,15 @@ def get_research_report(research_id):
# Parse metadata if it exists
metadata = research.research_meta
- # Check if report file exists
- if not research.report_path or not os.path.exists(
- research.report_path
- ):
- return jsonify({"error": "Report file not found"}), 404
- # Read the report content
- try:
- with open(research.report_path, "r", encoding="utf-8") as f:
- content = f.read()
- except Exception as e:
- logger.exception(
- f"Error reading report file {research.report_path}: {e}"
- )
- return jsonify({"error": "Error reading report file"}), 500
+ # Get report content using storage abstraction
+ from ...storage import get_report_storage
+
+ storage = get_report_storage(session=db_session)
+ content = storage.get_report(research_id, username)
+
+ if content is None:
+ return jsonify({"error": "Report not found"}), 404
# Return the report data
return jsonify(
diff --git a/src/local_deep_research/web/static/js/components/results.js b/src/local_deep_research/web/static/js/components/results.js
index acf2673339..c86d62adc2 100644
--- a/src/local_deep_research/web/static/js/components/results.js
+++ b/src/local_deep_research/web/static/js/components/results.js
@@ -113,8 +113,8 @@
// Show loading state
resultsContainer.innerHTML = '<div class="text-center my-5"><i class="fas fa-spinner fa-pulse"></i><p class="mt-3">Loading research results...</p></div>';
- // Fetch result from history API (reports are stored in database now)
- const response = await fetch(`/history/report/${researchId}`);
+ // Fetch result from report API (reports are stored in database now)
+ const response = await fetch(`/api/report/${researchId}`);
if (!response.ok) {
throw new Error(`HTTP error ${response.status}`);