~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: Handle None values in strategy initialization and settings retrieval
LearningCircuit77140032f2eb
diff --git a/src/local_deep_research/advanced_search_system/strategies/focused_iteration_strategy.py b/src/local_deep_research/advanced_search_system/strategies/focused_iteration_strategy.pyindex 80323bc3f8..358376a037 100644--- a/src/local_deep_research/advanced_search_system/strategies/focused_iteration_strategy.py+++ b/src/local_deep_research/advanced_search_system/strategies/focused_iteration_strategy.py@@ -63,9 +63,15 @@ class FocusedIterationStrategy(BaseSearchStrategy):self.model = modelself.progress_callback = None- # Configuration - ensure these are integers- self.max_iterations = int(max_iterations)- self.questions_per_iteration = int(questions_per_iteration)+ # Configuration - ensure these are integers with defaults+ self.max_iterations = (+ int(max_iterations) if max_iterations is not None else 3+ )+ self.questions_per_iteration = (+ int(questions_per_iteration)+ if questions_per_iteration is not None+ else 3+ )self.use_browsecomp_optimization = use_browsecomp_optimization# Initialize specialized componentsdiff --git a/src/local_deep_research/advanced_search_system/strategies/parallel_search_strategy.py b/src/local_deep_research/advanced_search_system/strategies/parallel_search_strategy.pyindex a2a5777b36..b71b945ffd 100644--- a/src/local_deep_research/advanced_search_system/strategies/parallel_search_strategy.py+++ b/src/local_deep_research/advanced_search_system/strategies/parallel_search_strategy.py@@ -156,15 +156,17 @@ class ParallelSearchStrategy(BaseSearchStrategy):context = f"""Iteration: {1} of {iterations_to_run}"""else:context = ""+ questions_per_iter = get_setting_from_snapshot(+ "search.questions_per_iteration",+ default=3,+ settings_snapshot=self.settings_snapshot,+ )questions = self.question_generator.generate_questions(current_knowledge=context,query=query,- questions_per_iteration=int(- get_setting_from_snapshot(- "search.questions_per_iteration",- settings_snapshot=self.settings_snapshot,- )- ),+ questions_per_iteration=int(questions_per_iter)+ if questions_per_iter is not None+ else 3,questions_by_iteration=self.questions_by_iteration,)@@ -194,15 +196,17 @@ class ParallelSearchStrategy(BaseSearchStrategy):Iteration: {iteration} of {iterations_to_run}"""# Generate questions+ questions_per_iter = get_setting_from_snapshot(+ "search.questions_per_iteration",+ default=3,+ settings_snapshot=self.settings_snapshot,+ )questions = self.question_generator.generate_questions(current_knowledge=context,query=query,- questions_per_iteration=int(- get_setting_from_snapshot(- "search.questions_per_iteration",- settings_snapshot=self.settings_snapshot,- )- ),+ questions_per_iteration=int(questions_per_iter)+ if questions_per_iter is not None+ else 3,questions_by_iteration=self.questions_by_iteration,)diff --git a/src/local_deep_research/config/llm_config.py b/src/local_deep_research/config/llm_config.pyindex 7d7066889b..15c30a6adb 100644--- a/src/local_deep_research/config/llm_config.py+++ b/src/local_deep_research/config/llm_config.py@@ -44,7 +44,9 @@ def is_openai_available(settings_snapshot=None):"""Check if OpenAI is available"""try:api_key = get_setting_from_snapshot(- "llm.openai.api_key", settings_snapshot=settings_snapshot+ "llm.openai.api_key",+ default=None,+ settings_snapshot=settings_snapshot,)return bool(api_key)except Exception:@@ -55,7 +57,9 @@ def is_anthropic_available(settings_snapshot=None):"""Check if Anthropic is available"""try:api_key = get_setting_from_snapshot(- "llm.anthropic.api_key", settings_snapshot=settings_snapshot+ "llm.anthropic.api_key",+ default=None,+ settings_snapshot=settings_snapshot,)return bool(api_key)except Exception:@@ -66,7 +70,9 @@ def is_openai_endpoint_available(settings_snapshot=None):"""Check if OpenAI endpoint is available"""try:api_key = get_setting_from_snapshot(- "llm.openai_endpoint.api_key", settings_snapshot=settings_snapshot+ "llm.openai_endpoint.api_key",+ default=None,+ settings_snapshot=settings_snapshot,)return bool(api_key)except Exception:@@ -151,7 +157,9 @@ def is_llamacpp_available(settings_snapshot=None):from langchain_community.llms import LlamaCpp # noqa: F401model_path = get_setting_from_snapshot(- "llm.llamacpp_model_path", settings_snapshot=settings_snapshot+ "llm.llamacpp_model_path",+ default=None,+ settings_snapshot=settings_snapshot,)return bool(model_path) and os.path.exists(model_path)except Exception:@@ -306,13 +314,17 @@ def get_llm((provider == "openai"and get_setting_from_snapshot(- "llm.openai.api_key", settings_snapshot=settings_snapshot+ "llm.openai.api_key",+ default=None,+ settings_snapshot=settings_snapshot,))or (provider == "anthropic"and get_setting_from_snapshot(- "llm.anthropic.api_key", settings_snapshot=settings_snapshot+ "llm.anthropic.api_key",+ default=None,+ settings_snapshot=settings_snapshot,))or (@@ -478,31 +490,37 @@ def get_llm(# Add optional parameters if they exist in settingsapi_base = get_setting_from_snapshot(- "llm.openai.api_base", settings_snapshot=settings_snapshot+ "llm.openai.api_base",+ default=None,+ settings_snapshot=settings_snapshot,)if api_base:openai_params["openai_api_base"] = api_baseorganization = get_setting_from_snapshot(- "llm.openai.organization", settings_snapshot=settings_snapshot+ "llm.openai.organization",+ default=None,+ settings_snapshot=settings_snapshot,)if organization:openai_params["openai_organization"] = organizationstreaming = get_setting_from_snapshot(- "llm.streaming", settings_snapshot=settings_snapshot+ "llm.streaming", default=None, settings_snapshot=settings_snapshot)if streaming is not None:openai_params["streaming"] = streamingmax_retries = get_setting_from_snapshot(- "llm.max_retries", settings_snapshot=settings_snapshot+ "llm.max_retries", default=None, settings_snapshot=settings_snapshot)if max_retries is not None:openai_params["max_retries"] = max_retriesrequest_timeout = get_setting_from_snapshot(- "llm.request_timeout", settings_snapshot=settings_snapshot+ "llm.request_timeout",+ default=None,+ settings_snapshot=settings_snapshot,)if request_timeout is not None:openai_params["request_timeout"] = request_timeout