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.

Merge branch 'dev' into fix/issue-594-remove-settings-wrapper

LearningCircuit42ba4b47b26a
diff --cc src/local_deep_research/web/app_factory.py
index bc5e2dba15,0ff1c8962e..06d23e680a
--- a/src/local_deep_research/web/app_factory.py
+++ b/src/local_deep_research/web/app_factory.py
@@@ -353,33 -353,26 +354,33 @@@ def register_blueprints(app)
if "username" not in session:
return redirect(url_for("auth.login"))
- # Load current settings from database
- settings = {
- "llm_provider": get_setting_from_db_main_thread(
- "llm.provider", "ollama"
- ),
- "llm_model": get_setting_from_db_main_thread("llm.model", ""),
- "llm_openai_endpoint_url": get_setting_from_db_main_thread(
- "llm.openai_endpoint.url", ""
- ),
- "search_tool": get_setting_from_db_main_thread("search.tool", ""),
- "search_iterations": get_setting_from_db_main_thread(
- "search.iterations", 2
- ),
- "search_questions_per_iteration": get_setting_from_db_main_thread(
- "search.questions_per_iteration", 3
- ),
- }
+ # Load current settings from database using proper session context
+ username = session.get("username")
+ settings = {}
+ with get_user_db_session(username) as db_session:
+ if db_session:
+ settings_manager = get_settings_manager(db_session, username)
+ settings = {
+ "llm_provider": settings_manager.get_setting(
+ "llm.provider", "ollama"
+ ),
+ "llm_model": settings_manager.get_setting("llm.model", ""),
+ "llm_openai_endpoint_url": settings_manager.get_setting(
+ "llm.openai_endpoint.url", ""
+ ),
+ "search_tool": settings_manager.get_setting(
+ "search.tool", ""
+ ),
+ "search_iterations": settings_manager.get_setting(
+ "search.iterations", 2
+ ),
+ "search_questions_per_iteration": settings_manager.get_setting(
+ "search.questions_per_iteration", 3
+ ),
+ }
# Debug logging
- logger.debug(f"Settings loaded: {settings}")
+ log_settings(settings, "Research page settings loaded")
return render_template_with_defaults(
"pages/research.html", settings=settings