~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
"""
Default configuration module for Local Deep Research.
This module is responsible for loading and initializing default
configuration files and resources used throughout the application.
"""
import json
from functools import cache
from pathlib import Path
from loguru import logger
# Define the path to the package's defaults directory
DEFAULTS_DIR = Path(__file__).parent
# Default files available in this package
DEFAULT_FILES = {
"main.toml": DEFAULTS_DIR / "main.toml",
"search_engines.toml": DEFAULTS_DIR / "search_engines.toml",
}
@cache
def get_default_theme() -> str:
"""Read the shipped theme default once for server and browser consumers.
``hashed`` is the registered ID of the existing Hashed dark palette,
preferred while light themes still need refinement. Read ``app.theme``
so account defaults, initial rendering and repairs share that choice.
"""
# nosemgrep: semgrep.rules.path-traversal-risk, reason: Only a fixed filename beneath the installed defaults package is opened
with (DEFAULTS_DIR / "default_settings.json").open(
encoding="utf-8-sig"
) as settings_file:
theme = json.load(settings_file)["app.theme"]["value"]
if not isinstance(theme, str):
raise ValueError("The default app.theme value must be a string")
return theme
def get_default_file_path(filename):
"""Get the path to a default configuration file."""
if filename in DEFAULT_FILES:
return DEFAULT_FILES[filename]
return None
def list_default_files():
"""List all available default configuration files."""
return list(DEFAULT_FILES.keys())
def ensure_defaults_exist():
"""Verify that all expected default files exist in the package."""
missing = []
for filename, filepath in DEFAULT_FILES.items():
if not filepath.exists():
missing.append(filename)
if missing:
logger.warning(
f"The following default files are missing from the package: {', '.join(missing)}"
)
return False
return True