Skip to content

~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.

fix: Fix settings handling in parallel_search_strategy and tests

LearningCircuit07afcc8233dc
diff --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.py
index b71b945ffd..dcb8868216 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
@@ -10,7 +10,6 @@ from loguru import logger
from ...citation_handler import CitationHandler
# Model and search should be provided by AdvancedSearchSystem
-from ...config.thread_settings import get_setting_from_snapshot
from ...utilities.search_utilities import extract_links_from_search_results
from ..filters.cross_engine_filter import CrossEngineFilter
from ..findings.repository import FindingsRepository
@@ -122,9 +121,7 @@ class ParallelSearchStrategy(BaseSearchStrategy):
}
# Determine number of iterations to run
- iterations_to_run = get_setting_from_snapshot(
- "search.iterations", settings_snapshot=self.settings_snapshot
- )
+ iterations_to_run = self.get_setting("search.iterations")
logger.debug("Selected amount of iterations: " + str(iterations_to_run))
iterations_to_run = int(iterations_to_run)
try:
@@ -156,10 +153,8 @@ 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_per_iter = self.get_setting(
+ "search.questions_per_iteration"
)
questions = self.question_generator.generate_questions(
current_knowledge=context,
@@ -196,10 +191,8 @@ 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_per_iter = self.get_setting(
+ "search.questions_per_iteration"
)
questions = self.question_generator.generate_questions(
current_knowledge=context,
diff --git a/tests/test_search_system.py b/tests/test_search_system.py
index a37d26bda6..7e4869566b 100644
--- a/tests/test_search_system.py
+++ b/tests/test_search_system.py
@@ -110,6 +110,8 @@ def test_init_source_based_strategy(monkeypatch):
"search.cross_engine_max_results": {"value": 100, "type": "int"},
"search.cross_engine_use_reddit": {"value": False, "type": "bool"},
"search.cross_engine_min_date": {"value": None, "type": "str"},
+ "search.iterations": {"value": 2, "type": "int"},
+ "search.questions_per_iteration": {"value": 3, "type": "int"},
}
# Create with default strategy (source-based)
@@ -189,6 +191,8 @@ def test_init_parallel_strategy(monkeypatch):
"search.cross_engine_max_results": {"value": 100, "type": "int"},
"search.cross_engine_use_reddit": {"value": False, "type": "bool"},
"search.cross_engine_min_date": {"value": None, "type": "str"},
+ "search.iterations": {"value": 2, "type": "int"},
+ "search.questions_per_iteration": {"value": 3, "type": "int"},
}
# Create with parallel strategy
@@ -285,6 +289,8 @@ def test_set_progress_callback(monkeypatch):
"search.cross_engine_max_results": {"value": 100, "type": "int"},
"search.cross_engine_use_reddit": {"value": False, "type": "bool"},
"search.cross_engine_min_date": {"value": None, "type": "str"},
+ "search.iterations": {"value": 2, "type": "int"},
+ "search.questions_per_iteration": {"value": 3, "type": "int"},
}
system = AdvancedSearchSystem(