~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: add usedforsecurity=False to MD5 hash calls for caching purposes
LearningCircuite39d59634de2
diff --git a/src/local_deep_research/benchmarks/web_api/benchmark_service.py b/src/local_deep_research/benchmarks/web_api/benchmark_service.pyindex ac5ba5024f..6957a043ef 100644--- a/src/local_deep_research/benchmarks/web_api/benchmark_service.py+++ b/src/local_deep_research/benchmarks/web_api/benchmark_service.py@@ -61,12 +61,16 @@ class BenchmarkService:k: v for k, v in relevant_params.items() if v is not None}config_str = json.dumps(relevant_params, sort_keys=True)- return hashlib.md5(config_str.encode()).hexdigest()[:8]+ return hashlib.md5(+ config_str.encode(), usedforsecurity=False+ ).hexdigest()[:8]def generate_query_hash(self, question: str, dataset_type: str) -> str:"""Generate a hash for a query to enable deduplication."""query_content = f"{question.strip()}|{dataset_type.lower()}"- return hashlib.md5(query_content.encode()).hexdigest()+ return hashlib.md5(+ query_content.encode(), usedforsecurity=False+ ).hexdigest()def create_benchmark_run(self,diff --git a/src/local_deep_research/utilities/search_cache.py b/src/local_deep_research/utilities/search_cache.pyindex 88d31eec32..2225898d1a 100644--- a/src/local_deep_research/utilities/search_cache.py+++ b/src/local_deep_research/utilities/search_cache.py@@ -85,7 +85,9 @@ class SearchCache:"""Generate hash for query + search engine combination."""normalized_query = self._normalize_query(query)cache_key = f"{search_engine}:{normalized_query}"- return hashlib.md5(cache_key.encode()).hexdigest()+ return hashlib.md5(+ cache_key.encode(), usedforsecurity=False+ ).hexdigest()def _cleanup_expired(self):"""Remove expired entries from database."""diff --git a/src/local_deep_research/web/services/research_service.py b/src/local_deep_research/web/services/research_service.pyindex 8866104f56..a8dcc61ff7 100644--- a/src/local_deep_research/web/services/research_service.py+++ b/src/local_deep_research/web/services/research_service.py@@ -308,7 +308,9 @@ def _generate_report_path(query: str) -> Path:"""# Generate a unique filename that does not contain# non-alphanumeric characters.- query_hash = hashlib.md5(query.encode("utf-8")).hexdigest()[:10]+ query_hash = hashlib.md5(+ query.encode("utf-8"), usedforsecurity=False+ ).hexdigest()[:10]return OUTPUT_DIR / (f"research_report_{query_hash}_{int(datetime.now(UTC).timestamp())}.md")diff --git a/src/local_deep_research/web_search_engines/engines/search_engine_local.py b/src/local_deep_research/web_search_engines/engines/search_engine_local.pyindex 74c071c28a..485c192475 100644--- a/src/local_deep_research/web_search_engines/engines/search_engine_local.py+++ b/src/local_deep_research/web_search_engines/engines/search_engine_local.py@@ -271,7 +271,9 @@ class LocalEmbeddingManager:# Canonicalize the path so we don't have weird Windows vs. Linux# problems or issues with trailing slashes.canonical_folder_path = "/".join(folder_path.parts)- return hashlib.md5(canonical_folder_path.encode()).hexdigest()+ return hashlib.md5(+ canonical_folder_path.encode(), usedforsecurity=False+ ).hexdigest()def _get_index_path(self, folder_path: Path) -> Path:"""Get the path where the index for a specific folder should be stored"""@@ -847,7 +849,7 @@ class LocalSearchEngine(BaseSearchEngine):previews = []for i, result in enumerate(raw_results):# Create a unique ID- result_id = f"local-{i}-{hashlib.md5(result['content'][:50].encode()).hexdigest()}"+ result_id = f"local-{i}-{hashlib.md5(result['content'][:50].encode(), usedforsecurity=False).hexdigest()}"# Extract filename and pathsource_path = result["metadata"].get("source", "Unknown")