~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
Correctly handle the OLLAMA_BASE_URL environment variable.
Daniel Pettib5142d264d5d
diff --git a/src/local_deep_research/config/llm_config.py b/src/local_deep_research/config/llm_config.pyindex c03cb69fd3..305a96e600 100644--- a/src/local_deep_research/config/llm_config.py+++ b/src/local_deep_research/config/llm_config.py@@ -163,7 +163,7 @@ def get_llm(model_name=None, temperature=None, provider=None, openai_endpoint_urelif provider == "ollama":try:# Use the configurable Ollama base URL- base_url = settings.get(+ base_url = os.getenv("OLLAMA_BASE_URL",settings.llm.get("ollama_base_url", "http://localhost:11434"),)@@ -389,7 +389,7 @@ def is_ollama_available():try:import requests- base_url = settings.get(+ base_url = os.getenv("OLLAMA_BASE_URL",settings.llm.get("ollama_base_url", "http://localhost:11434"),)diff --git a/src/local_deep_research/web/routes/api_routes.py b/src/local_deep_research/web/routes/api_routes.pyindex 240bd7b7e9..b253ecd00c 100644--- a/src/local_deep_research/web/routes/api_routes.py+++ b/src/local_deep_research/web/routes/api_routes.py@@ -1,5 +1,6 @@import jsonimport logging+import osimport requestsfrom flask import Blueprint, current_app, jsonify, request@@ -255,7 +256,10 @@ def check_ollama_status():)# Get Ollama API URL- ollama_base_url = llm_config.get("ollama_base_url", "http://localhost:11434")+ ollama_base_url = os.getenv(+ "OLLAMA_BASE_URL",+ llm_config.get("ollama_base_url", "http://localhost:11434"),+ )logger.info(f"Checking Ollama status at: {ollama_base_url}")@@ -376,7 +380,10 @@ def check_ollama_model():# Log which model we're checking for debugginglogger.info(f"Checking availability of Ollama model: {model_name}")- ollama_base_url = llm_config.get("ollama_base_url", "http://localhost:11434")+ ollama_base_url = os.getenv(+ "OLLAMA_BASE_URL",+ llm_config.get("ollama_base_url", "http://localhost:11434"),+ )# Check if the model is availabletry:diff --git a/src/local_deep_research/web/routes/settings_routes.py b/src/local_deep_research/web/routes/settings_routes.pyindex 1b2333afdc..90d9616da5 100644--- a/src/local_deep_research/web/routes/settings_routes.py+++ b/src/local_deep_research/web/routes/settings_routes.py@@ -896,9 +896,12 @@ def api_get_available_models():# Try to query the Ollama API directlytry:current_app.logger.info("Attempting to connect to Ollama API")- ollama_response = requests.get(- "http://localhost:11434/api/tags", timeout=5++ base_url = os.getenv(+ "OLLAMA_BASE_URL",+ "http://localhost:11434",)+ ollama_response = requests.get(f"{base_url}/api/tags", timeout=5)current_app.logger.debug(f"Ollama API response: Status {ollama_response.status_code}"@@ -1567,7 +1570,11 @@ def check_ollama_status():"""Check if Ollama is running and available"""try:# Set a shorter timeout for the request- response = requests.get("http://localhost:11434/api/version", timeout=2.0)+ base_url = os.getenv(+ "OLLAMA_BASE_URL",+ "http://localhost:11434",+ )+ response = requests.get(f"{base_url}/api/version", timeout=2.0)if response.status_code == 200:return jsonify(