~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(search): accept research_context in FullSearchResults.run (#7382)
EnragedAntelopee039c0dab931
diff --git a/changelog.d/7382.bugfix.md b/changelog.d/7382.bugfix.mdnew file mode 100644index 0000000000..67ca2e5995--- /dev/null+++ b/changelog.d/7382.bugfix.md@@ -0,0 +1 @@+Full-content search no longer aborts with a `TypeError` on every query, which previously left research runs with zero sources and a "No sources were found" report despite reporting success.diff --git a/src/local_deep_research/web_search_engines/engines/full_search.py b/src/local_deep_research/web_search_engines/engines/full_search.pyindex cd5081a35e..e0eef77336 100644--- a/src/local_deep_research/web_search_engines/engines/full_search.py+++ b/src/local_deep_research/web_search_engines/engines/full_search.py@@ -387,7 +387,15 @@ class FullSearchResults:logger.exception(safe_msg)return self._unfiltered_fallback(results)- def run(self, query: str):+ def run(+ self, query: str, research_context: Dict[str, Any] | None = None+ ) -> List[Dict[str, Any]]:+ # ``research_context`` is accepted for signature parity with+ # ``BaseSearchEngine.run`` and its other overrides (e.g. SearXNG,+ # arXiv), which callers such as ``FocusedIterationStrategy``+ # invoke positionally by keyword. This engine derives everything+ # it needs from ``query`` and its own settings, so the value is+ # deliberately unused.# Step 1: Get search resultssearch_results = self.web_search.invoke(query)if not isinstance(search_results, list):diff --git a/tests/search_engines/test_search_engine_searxng.py b/tests/search_engines/test_search_engine_searxng.pyindex 24ea3a6746..22d045df60 100644--- a/tests/search_engines/test_search_engine_searxng.py+++ b/tests/search_engines/test_search_engine_searxng.py@@ -1128,3 +1128,27 @@ class TestSearXNGFullSearchIntegration:assert results[0]["title"] == "Result 1"assert results[0]["link"] == "https://example.com/page1"assert results[0]["full_content"] == "Full Page 1 Text"++ def test_run_accepts_research_context_keyword(self, monkeypatch):+ """``run`` must accept the ``research_context`` kwarg callers pass.++ ``FocusedIterationStrategy._execute_parallel_searches`` calls+ ``self.search.run(q, research_context=current_context)``, matching+ ``BaseSearchEngine.run`` and the other overrides (SearXNG, arXiv).+ ``FullSearchResults.run`` previously declared only ``query``, so every+ search raised ``TypeError: run() got an unexpected keyword argument+ 'research_context'``, silently yielding zero sources.+ """+ from local_deep_research.web_search_engines.engines.full_search import (+ FullSearchResults,+ )++ engine = FullSearchResults.__new__(FullSearchResults)+ engine.web_search = Mock()+ engine.web_search.invoke = Mock(return_value=[])+ engine.llm = None+ engine.settings_snapshot = {}++ # Would raise TypeError before the signature was aligned with the base+ # class; an empty result list is the expected outcome for no results.+ assert engine.run("query", research_context={"foo": "bar"}) == []