~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
fix: Fix UUID/integer type mismatches for research IDs
LearningCircuit4f89145977b7
diff --git a/src/local_deep_research/database/models/metrics.py b/src/local_deep_research/database/models/metrics.pyindex c8a3164f19..3cf922332f 100644--- a/src/local_deep_research/database/models/metrics.py+++ b/src/local_deep_research/database/models/metrics.py@@ -24,7 +24,7 @@ class TokenUsage(Base):__tablename__ = "token_usage"- id = Column(Integer, primary_key=True)+ id = Column(Integer, primary_key=True, autoincrement=True)research_id = Column(String(36), nullable=False, index=True)timestamp = Column(DateTime, nullable=False, default=datetime.utcnow)@@ -134,7 +134,7 @@ class SearchCall(Base):__tablename__ = "search_calls"- id = Column(Integer, primary_key=True)+ id = Column(Integer, primary_key=True, autoincrement=True)research_id = Column(String(36), nullable=False, index=True)timestamp = Column(DateTime, nullable=False, default=datetime.utcnow)diff --git a/src/local_deep_research/web/routes/api_routes.py b/src/local_deep_research/web/routes/api_routes.pyindex cb56af2b6d..72f0545e3c 100644--- a/src/local_deep_research/web/routes/api_routes.py+++ b/src/local_deep_research/web/routes/api_routes.py@@ -129,7 +129,7 @@ def api_start_research():)-@api_bp.route("/status/<int:research_id>", methods=["GET"])+@api_bp.route("/status/<string:research_id>", methods=["GET"])@login_requireddef api_research_status(research_id):"""@@ -175,7 +175,7 @@ def api_research_status(research_id):return jsonify({"status": "error", "message": str(e)}), 500-@api_bp.route("/terminate/<int:research_id>", methods=["POST"])+@api_bp.route("/terminate/<string:research_id>", methods=["POST"])@login_requireddef api_terminate_research(research_id):"""@@ -198,7 +198,7 @@ def api_terminate_research(research_id):)-@api_bp.route("/resources/<int:research_id>", methods=["GET"])+@api_bp.route("/resources/<string:research_id>", methods=["GET"])@login_requireddef api_get_resources(research_id):"""@@ -214,7 +214,7 @@ def api_get_resources(research_id):)-@api_bp.route("/resources/<int:research_id>", methods=["POST"])+@api_bp.route("/resources/<string:research_id>", methods=["POST"])@login_requireddef api_add_resource(research_id):"""@@ -276,7 +276,7 @@ def api_add_resource(research_id):@api_bp.route(- "/resources/<int:research_id>/delete/<int:resource_id>", methods=["DELETE"]+ "/resources/<string:research_id>/delete/<int:resource_id>", methods=["DELETE"])@login_requireddef api_delete_resource(research_id, resource_id):diff --git a/src/local_deep_research/web/routes/history_routes.py b/src/local_deep_research/web/routes/history_routes.pyindex 0be7d99693..ae1fb14b46 100644--- a/src/local_deep_research/web/routes/history_routes.py+++ b/src/local_deep_research/web/routes/history_routes.py@@ -147,7 +147,7 @@ def get_history():return response-@history_bp.route("/status/<int:research_id>")+@history_bp.route("/status/<string:research_id>")@login_requireddef get_research_status(research_id):db_session = get_db_session()@@ -195,7 +195,7 @@ def get_research_status(research_id):return jsonify(result)-@history_bp.route("/details/<int:research_id>")+@history_bp.route("/details/<string:research_id>")@login_requireddef get_research_details(research_id):"""Get detailed progress log for a specific research"""@@ -253,7 +253,7 @@ def get_research_details(research_id):)-@history_bp.route("/history/report/<int:research_id>")+@history_bp.route("/history/report/<string:research_id>")@login_requireddef get_report(research_id):db_session = get_db_session()@@ -300,7 +300,7 @@ def get_report(research_id):return jsonify({"status": "error", "message": str(e)}), 500-@history_bp.route("/markdown/<int:research_id>")+@history_bp.route("/markdown/<string:research_id>")@login_requireddef get_markdown(research_id):"""Get markdown export for a specific research"""@@ -324,7 +324,7 @@ def get_markdown(research_id):return jsonify({"status": "error", "message": str(e)}), 500-@history_bp.route("/logs/<int:research_id>")+@history_bp.route("/logs/<string:research_id>")@login_requireddef get_research_logs(research_id):"""Get logs for a specific research ID"""@@ -356,7 +356,7 @@ def get_research_logs(research_id):return jsonify({"status": "success", "logs": formatted_logs})-@history_bp.route("/log_count/<int:research_id>")+@history_bp.route("/log_count/<string:research_id>")@login_requireddef get_log_count(research_id):"""Get the total number of logs for a specific research ID"""diff --git a/src/local_deep_research/web/routes/research_routes.py b/src/local_deep_research/web/routes/research_routes.pyindex a5bb251755..142e0b86a9 100644--- a/src/local_deep_research/web/routes/research_routes.py+++ b/src/local_deep_research/web/routes/research_routes.py@@ -15,6 +15,7 @@ from flask import (url_for,)from loguru import logger+from sqlalchemy import funcfrom ...config.paths import get_research_outputs_directoryfrom ...database.encrypted_db import db_manager@@ -306,7 +307,7 @@ def start_research():# Add to queue instead of starting immediately# Get the next position in queue for this usermax_position = (- db_session.query(db_manager.func.max(QueuedResearch.position))+ db_session.query(func.max(QueuedResearch.position)).filter_by(username=username).scalar()or 0@@ -375,7 +376,7 @@ def start_research():# Add to queuemax_position = (db_session.query(- db_manager.func.max(QueuedResearch.position)+ func.max(QueuedResearch.position)).filter_by(username=username).scalar()diff --git a/src/local_deep_research/web/services/resource_service.py b/src/local_deep_research/web/services/resource_service.pyindex 9a2234bac2..d893aae399 100644--- a/src/local_deep_research/web/services/resource_service.py+++ b/src/local_deep_research/web/services/resource_service.py@@ -11,7 +11,7 @@ def get_resources_for_research(research_id):Retrieve resources associated with a specific research projectArgs:- research_id (int): The ID of the research+ research_id (str): The UUID of the researchReturns:list: List of resource objects for the research@@ -63,7 +63,7 @@ def add_resource(Add a new resource to the research_resources tableArgs:- research_id (int): The ID of the research+ research_id (str): The UUID of the researchtitle (str): The title of the resourceurl (str): The URL of the resourcecontent_preview (str, optional): A preview or snippet of the resource content