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: Handle unauthenticated access in API documentation endpoint

LearningCircuit70799d97f1af
diff --git a/src/local_deep_research/web/api.py b/src/local_deep_research/web/api.py
index 56126f462c..ef2cc21f4a 100644
--- a/src/local_deep_research/web/api.py
+++ b/src/local_deep_research/web/api.py
@@ -43,15 +43,19 @@ def api_access_control(f):
api_enabled = True # Default to enabled
rate_limit = 60 # Default 60 requests per minute
- with get_user_db_session(username) as db_session:
- if db_session:
- settings_manager = get_settings_manager(db_session, username)
- api_enabled = settings_manager.get_setting(
- "app.enable_api", True
- )
- rate_limit = settings_manager.get_setting(
- "app.api_rate_limit", 60
- )
+ # Only try to get settings if there's an authenticated user
+ if username:
+ with get_user_db_session(username) as db_session:
+ if db_session:
+ settings_manager = get_settings_manager(
+ db_session, username
+ )
+ api_enabled = settings_manager.get_setting(
+ "app.enable_api", True
+ )
+ rate_limit = settings_manager.get_setting(
+ "app.api_rate_limit", 60
+ )
if not api_enabled:
return jsonify({"error": "API access is disabled"}), 403