~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: address code review feedback from PR #1265
LearningCircuitca2f13181f10
diff --git a/src/local_deep_research/research_library/routes/rag_routes.py b/src/local_deep_research/research_library/routes/rag_routes.pyindex 1dadafcf8f..8ec4f6eee0 100644--- a/src/local_deep_research/research_library/routes/rag_routes.py+++ b/src/local_deep_research/research_library/routes/rag_routes.py@@ -2049,7 +2049,10 @@ def index_collection(collection_id):f"Indexing document {idx}/{total}: {filename}")- # Use a queue to run index_document in a thread while sending heartbeats+ # Run index_document in a separate thread to allow sending SSE heartbeats.+ # This keeps the HTTP connection alive during long indexing operations,+ # preventing timeouts from proxy servers (nginx) and browsers.+ # The main thread periodically yields heartbeat comments while waiting.result_queue = queue.Queue()error_queue = queue.Queue()@@ -2187,6 +2190,10 @@ def _get_rag_service_for_thread(try:default_text_separators = json.loads(default_text_separators)except json.JSONDecodeError:+ logger.warning(+ f"Invalid JSON for local_search_text_separators setting: {default_text_separators!r}. "+ "Using default separators."+ )default_text_separators = ["\n\n", "\n", ". ", " ", ""]default_distance_metric = settings_manager.get_setting("local_search_distance_metric", "cosine"diff --git a/src/local_deep_research/research_library/services/library_rag_service.py b/src/local_deep_research/research_library/services/library_rag_service.pyindex 46cdfc920b..6e1d6dce3c 100644--- a/src/local_deep_research/research_library/services/library_rag_service.py+++ b/src/local_deep_research/research_library/services/library_rag_service.py@@ -74,6 +74,10 @@ class LibraryRAGService:"""self.username = usernameself._db_password = db_password # Can be used for thread access+ # Initialize optional attributes to None before they're set below+ # This allows the db_password setter to check them without hasattr+ self.embedding_manager = None+ self.integrity_manager = Noneself.embedding_model = embedding_modelself.embedding_provider = embedding_providerself.chunk_size = chunk_size@@ -160,9 +164,9 @@ class LibraryRAGService:def db_password(self, value):"""Set database password and propagate to embedding manager and integrity manager."""self._db_password = value- if hasattr(self, "embedding_manager") and self.embedding_manager:+ if self.embedding_manager:self.embedding_manager.db_password = value- if hasattr(self, "integrity_manager") and self.integrity_manager:+ if self.integrity_manager:self.integrity_manager.password = valuedef _get_index_hash(