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.

refactor(service): move the call-time preview import inside save_research_strategy's try (#6952)

LearningCircuit80076f49ddc9
diff --git a/src/local_deep_research/web/services/research_service.py b/src/local_deep_research/web/services/research_service.py
index 717b3b9aa4..a4bba193ca 100644
--- a/src/local_deep_research/web/services/research_service.py
+++ b/src/local_deep_research/web/services/research_service.py
@@ -360,10 +360,12 @@ def save_research_strategy(research_id, strategy_name, *, username):
# f-string (#6305). Imported at call time, not at module level, so this
# service does not pull the notes router (and FastAPI) into the CLI /
# MCP import tree; same pattern as the rag router import in
- # research_library/services/download_service.py.
- from ..routers.notes import _log_value_preview
-
+ # research_library/services/download_service.py. Inside the ``try``
+ # (#6939): a transient import failure joins the function's own handled
+ # path instead of escaping it.
try:
+ from ..routers.notes import _log_value_preview
+
logger.debug(
"save_research_strategy called with research_id={}, strategy_name={}",
research_id,