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: allow Custom OpenAI Endpoint model fetching without API key

LearningCircuitebe3f46589a1
diff --git a/src/local_deep_research/llm/providers/implementations/custom_openai_endpoint.py b/src/local_deep_research/llm/providers/implementations/custom_openai_endpoint.py
index 7594efd253..2eb3f749b9 100644
--- a/src/local_deep_research/llm/providers/implementations/custom_openai_endpoint.py
+++ b/src/local_deep_research/llm/providers/implementations/custom_openai_endpoint.py
@@ -43,6 +43,16 @@ class CustomOpenAIEndpointProvider(OpenAICompatibleProvider):
data_location = "User-defined"
is_cloud = True # Assume cloud by default
+ @classmethod
+ def requires_auth_for_models(cls):
+ """Custom endpoints may or may not require authentication for listing models.
+
+ Many OpenAI-compatible servers (vLLM, local LLMs, etc.) don't require
+ authentication. Return False to allow model listing without an API key.
+ If the endpoint requires auth, the OpenAI client will raise an error.
+ """
+ return False
+
@classmethod
def create_llm(cls, model_name=None, temperature=0.7, **kwargs):
"""Override to get URL from settings."""
diff --git a/src/local_deep_research/web/routes/settings_routes.py b/src/local_deep_research/web/routes/settings_routes.py
index 102b83909e..c73486e2e2 100644
--- a/src/local_deep_research/web/routes/settings_routes.py
+++ b/src/local_deep_research/web/routes/settings_routes.py
@@ -1238,14 +1238,16 @@ def api_get_available_models():
"llm.openai_endpoint.api_key", ""
)
- if endpoint_url and api_key:
+ if endpoint_url:
# Create settings snapshot with the URL to avoid race conditions
# (don't modify class attributes which could affect other requests)
settings_snapshot = {"llm.openai_endpoint.url": endpoint_url}
# Use the provider's list_models_for_api method with snapshot
+ # Many OpenAI-compatible servers (vLLM, local LLMs) don't require an API key,
+ # so we pass an empty string if none is configured
models = CustomOpenAIEndpointProvider.list_models_for_api(
- api_key, settings_snapshot
+ api_key or "", settings_snapshot
)
# Format models for the API response
@@ -1270,7 +1272,7 @@ def api_get_available_models():
else:
logger.info(
- "Custom OpenAI Endpoint URL or API key not configured"
+ "Custom OpenAI Endpoint URL not configured"
)
except Exception as e: