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.

bugfix

LearningCircuit4ab74e033196
diff --git a/src/local_deep_research/web/services/research_service.py b/src/local_deep_research/web/services/research_service.py
index 101413d8c6..72a7d2bf33 100644
--- a/src/local_deep_research/web/services/research_service.py
+++ b/src/local_deep_research/web/services/research_service.py
@@ -1447,14 +1447,16 @@ def cancel_research(research_id):
if not username:
return False
- with get_user_db_session(username) as session:
+ with get_user_db_session(username) as db_session:
research = (
- session.query(ResearchHistory).filter_by(id=research_id).first()
+ db_session.query(ResearchHistory)
+ .filter_by(id=research_id)
+ .first()
)
if not research:
return False
# If it exists but isn't in active_research, still update status
research.status = "suspended"
- session.commit()
+ db_session.commit()
return True
diff --git a/tests/api_tests/test_all_endpoints.py b/tests/api_tests/test_all_endpoints.py
index 7b000600d9..7385098cab 100644
--- a/tests/api_tests/test_all_endpoints.py
+++ b/tests/api_tests/test_all_endpoints.py
@@ -205,7 +205,7 @@ class TestAllEndpoints:
# Terminate research
response = authenticated_client.post(f"/api/terminate/{research_id}")
- assert response.status_code in [200, 404], (
+ assert response.status_code in [200, 400, 404], (
f"Terminate research failed: {response.data}"
)
@@ -213,7 +213,7 @@ class TestAllEndpoints:
response = authenticated_client.post(
f"/research/api/terminate/{research_id}"
)
- assert response.status_code in [200, 404], (
+ assert response.status_code in [200, 400, 404], (
f"API terminate research failed: {response.data}"
)