~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
Attempt number 5 at fixing docker tests.
Daniel Petti30f4af1e7d69
diff --git a/src/local_deep_research/web/routes/research_routes.py b/src/local_deep_research/web/routes/research_routes.pyindex ba2e936726..433edb1a1a 100644--- a/src/local_deep_research/web/routes/research_routes.py+++ b/src/local_deep_research/web/routes/research_routes.py@@ -688,9 +688,9 @@ def terminate_research(research_id):"message": "Research was suspended by user request",}- from ..services.socket_service import emit_socket_event+ from ..services.socket_service import SocketIOService- emit_socket_event(+ SocketIOService().emit_socket_event(f"research_progress_{research_id}", event_data)diff --git a/src/local_deep_research/web/services/research_service.py b/src/local_deep_research/web/services/research_service.pyindex 5015bcdc59..101413d8c6 100644--- a/src/local_deep_research/web/services/research_service.py+++ b/src/local_deep_research/web/services/research_service.py@@ -1391,19 +1391,21 @@ def handle_termination(completed_at = now.isoformat()# Fetch the start time from the database using the ORM- session = get_user_db_session(username)- research = session.query(ResearchHistory).filter_by(id=research_id).first()+ with get_user_db_session(username) as session:+ research = (+ session.query(ResearchHistory).filter_by(id=research_id).first()+ )- if research:- duration_seconds = calculate_duration(research.created_at)+ if research:+ duration_seconds = calculate_duration(research.created_at)- # Update the database with suspended status using the ORM- research.status = "suspended"- research.completed_at = completed_at- research.duration_seconds = duration_seconds- session.commit()- else:- logger.error(f"Research with ID {research_id} not found.")+ # Update the database with suspended status using the ORM+ research.status = "suspended"+ research.completed_at = completed_at+ research.duration_seconds = duration_seconds+ session.commit()+ else:+ logger.error(f"Research with ID {research_id} not found.")# Clean up resourcescleanup_research_resources(diff --git a/tests/api_tests/test_all_endpoints.py b/tests/api_tests/test_all_endpoints.pyindex 26cd7c5121..7b000600d9 100644--- a/tests/api_tests/test_all_endpoints.py+++ b/tests/api_tests/test_all_endpoints.py@@ -121,6 +121,9 @@ class TestAllEndpoints:"""Test ALL research-related endpoints."""logger.info("\n=== Testing ALL Research Endpoints ===")+ # Set up logging.+ logger.level("MILESTONE", no=26, color="<magenta><bold>")+# Test history endpoint firstresponse = authenticated_client.get("/history/api")assert response.status_code == 200, (diff --git a/tests/ui_tests/test_simple_research_api.py b/tests/ui_tests/test_simple_research_api.pyindex 3d03c62fea..04c429e298 100644--- a/tests/ui_tests/test_simple_research_api.py+++ b/tests/ui_tests/test_simple_research_api.py@@ -50,10 +50,10 @@ else:print(f"Re-login status: {login_resp.status_code}")home_page = session.get("http://127.0.0.1:5000/")- if 'name="csrf-token"' in home_page.text:- csrf_token = home_page.text.split('name="csrf-token" content="')[- 1- ].split('"')[0]+ if 'name="csrf_token"' in home_page.text:+ csrf_token = home_page.text.split('name="csrf_token" value="')[1].split(+ '"'+ )[0]else:print("Failed to get CSRF token")exit(1)