~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
Merge dev branch into feat/scientific-search-mode
LearningCircuit71c6796e39dd
diff --cc src/local_deep_research/web_search_engines/engines/parallel_search_engine.pyindex 53151307f2,c150726f41..2b8094f63e--- a/src/local_deep_research/web_search_engines/engines/parallel_search_engine.py+++ b/src/local_deep_research/web_search_engines/engines/parallel_search_engine.py@@@ -78,6 -74,6 +78,69 @@@ class ParallelSearchEngine(BaseSearchEnf"Parallel Search Engine initialized with {len(self.available_engines)} available engines: {', '.join(self.available_engines)}")++ def _load_engine_class(self, name: str, config_: Dict[str, Any]):++ """++ Load and return the engine class for the given configuration.++++ Returns:++ Tuple of (success: bool, engine_class: Optional[Type], error_msg: str)++ """++ import importlib++++ try:++ # Load the engine class directly++ module_path = config_.get("module_path")++ class_name = config_.get("class_name")++++ if not module_path or not class_name:++ return (++ False,++ None,++ f"Missing module_path or class_name for {name}",++ )++++ # Import the module++ package = None++ if module_path.startswith("."):++ # This is a relative import++ package = "local_deep_research.web_search_engines"++ module = importlib.import_module(module_path, package=package)++ engine_class = getattr(module, class_name)++++ return True, engine_class, ""++++ except Exception as e:++ return False, None, f"Could not load engine class for {name}: {e}"++++ def _check_api_key_availability(++ self, name: str, config_: Dict[str, Any]++ ) -> bool:++ """++ Check if API keys are available for engines that require them.++++ Args:++ name: Engine name++ config_: Engine configuration++++ Returns:++ True if the engine can be used (API key available or not required)++ """++ # If engine doesn't require API key, it's available++ if not config_.get("requires_api_key", False):++ return True++++ # Check if API key is configured++ api_key_setting = config_.get("api_key_setting")++ if api_key_setting and self.settings_snapshot:++ api_key = self.settings_snapshot.get(api_key_setting)++ if api_key and str(api_key).strip():++ return True++ logger.debug(f"Skipping {name} - API key not configured")++ return False++++ # No API key setting defined, assume it's available++ return True++def _get_search_config(self) -> Dict[str, Any]:"""Get search config from settings_snapshot"""if self.settings_snapshot:@@@ -127,66 -135,6 +202,22 @@@)continue- # Import the module- package = None- if module_path.startswith("."):- # This is a relative import- package = "local_deep_research.web_search_engines"- module = importlib.import_module(module_path, package=package)- engine_class = getattr(module, class_name)-- # Check if engine is public or if local engines are allowed- if hasattr(engine_class, "is_public"):- if (- not engine_class.is_public- and not self.allow_local_engines- ):- logger.debug(f"Skipping local/private engine: {name}")- continue- elif (- not engine_class.is_public and self.allow_local_engines- ):- logger.warning(- f"Including local/private engine {name} - data may be exposed"- )- else:- # No is_public flag - use old name-based detection as fallback- if not self.allow_local_engines:- if name.startswith("local") or name in [- "paperless",- "personal_notes",- "project_docs",- "research_papers",- "elasticsearch",- ]:- logger.debug(- f"Skipping suspected local engine (no is_public flag): {name}"- )- continue-- # Apply scientific mode filtering if enabled- if self.search_mode == "scientific":- # In scientific mode: include scientific engines AND generic engines- # Exclude non-scientific specialized engines (like Guardian, Wayback)- is_scientific = getattr(- engine_class, "is_scientific", False- )- is_generic = getattr(engine_class, "is_generic", False)-- if not (is_scientific or is_generic):- logger.debug(- f"Skipping {name} in scientific mode (not scientific or generic)"- )- continue++ # Apply scientific mode filtering if enabled++ if self.search_mode == "scientific":++ # In scientific mode: include scientific engines AND generic engines++ # Exclude non-scientific specialized engines (like Guardian, Wayback)++ is_scientific = getattr(engine_class, "is_scientific", False)++ is_generic = getattr(engine_class, "is_generic", False)+++ if not (is_scientific or is_generic):+ logger.debug(- f"Including {name} in scientific mode (scientific={is_scientific}, generic={is_generic})"++ f"Skipping {name} in scientific mode (not scientific or generic)"+ )- except Exception as e:- logger.debug(f"Could not load engine class for {name}: {e}")- # Skip engines we can't load- continue++ continue+++ logger.debug(++ f"Including {name} in scientific mode (scientific={is_scientific}, generic={is_generic})"++ )# Skip engines that require API keys if we don't want to use themif (config_.get("requires_api_key", False)