~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
docs: add comprehensive OpenRouter configuration documentation
LearningCircuit1395290fa5e8
diff --git a/docker-compose.yml b/docker-compose.ymlindex ef81c62f21..839633e910 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -73,6 +73,26 @@ services:# - LDR_LLM_MODEL=gemma3:12b # Lock the model selection# - LDR_LLM_OPENAI_API_KEY=sk-... # Lock OpenAI API key# - LDR_LLM_ANTHROPIC_API_KEY=sk-ant-... # Lock Anthropic API key++ # ============================================================================+ # OPENROUTER CONFIGURATION+ # To use OpenRouter (100+ models via one API), uncomment these lines:+ # Get your API key from https://openrouter.ai/+ # Browse models at https://openrouter.ai/models+ # ============================================================================+ # - LDR_LLM_PROVIDER=openai_endpoint+ # - LDR_LLM_OPENAI_ENDPOINT_URL=https://openrouter.ai/api/v1+ # - LDR_LLM_OPENAI_ENDPOINT_API_KEY=sk-or-v1-your-key-here+ # - LDR_LLM_MODEL=anthropic/claude-3.5-sonnet # or any OpenRouter model++ # ============================================================================+ # OTHER OPENAI-COMPATIBLE APIS+ # The same pattern works for any OpenAI-compatible service:+ # ============================================================================+ # - LDR_LLM_PROVIDER=openai_endpoint+ # - LDR_LLM_OPENAI_ENDPOINT_URL=https://your-provider.com/v1+ # - LDR_LLM_OPENAI_ENDPOINT_API_KEY=your-api-key+ # - LDR_LLM_MODEL=your-model-namevolumes:- ldr_data:/data- ldr_scripts:/scriptsdiff --git a/docs/env_configuration.md b/docs/env_configuration.mdindex e452225fc3..4e50c761f6 100644--- a/docs/env_configuration.md+++ b/docs/env_configuration.md@@ -85,6 +85,62 @@ SERP_API_KEY=your-api-key-hereLDR_SERP_API_KEY=your-api-key-here```+## LLM Provider Configuration++### OpenRouter++[OpenRouter](https://openrouter.ai/) provides access to 100+ models through an OpenAI-compatible API. To use OpenRouter:++1. Get an API key from [openrouter.ai](https://openrouter.ai/)+2. Configure using one of these methods:++**Method 1: Via Web UI (Recommended)**+- Navigate to Settings → LLM Provider+- Select "Custom OpenAI Endpoint"+- Set Endpoint URL to: `https://openrouter.ai/api/v1`+- Enter your OpenRouter API key+- Select your desired model++**Method 2: Via Environment Variables**++```bash+# Required environment variables for OpenRouter+export LDR_LLM_PROVIDER=openai_endpoint+export LDR_LLM_OPENAI_ENDPOINT_URL=https://openrouter.ai/api/v1+export LDR_LLM_OPENAI_ENDPOINT_API_KEY=sk-or-v1-your-key-here+export LDR_LLM_MODEL=anthropic/claude-3.5-sonnet # or any OpenRouter model+```++**Method 3: Docker Compose**++Add to your `docker-compose.yml` environment section:++```yaml+services:+ local-deep-research:+ environment:+ - LDR_LLM_PROVIDER=openai_endpoint+ - LDR_LLM_OPENAI_ENDPOINT_URL=https://openrouter.ai/api/v1+ - LDR_LLM_OPENAI_ENDPOINT_API_KEY=sk-or-v1-your-key-here+ - LDR_LLM_MODEL=anthropic/claude-3.5-sonnet+```++**Available Models**: Browse models at [openrouter.ai/models](https://openrouter.ai/models)++**Note**: OpenRouter uses the OpenAI-compatible API, so you select "Custom OpenAI Endpoint" as the provider and change the endpoint URL to OpenRouter's API.++### Other OpenAI-Compatible Providers++The same configuration pattern works for any OpenAI-compatible API service:++```bash+# Generic pattern for OpenAI-compatible APIs+export LDR_LLM_PROVIDER=openai_endpoint+export LDR_LLM_OPENAI_ENDPOINT_URL=https://your-provider.com/v1+export LDR_LLM_OPENAI_ENDPOINT_API_KEY=your-api-key+export LDR_LLM_MODEL=your-model-name+```+## Docker UsageFor Docker deployments, you can pass environment variables when starting containers:diff --git a/docs/faq.md b/docs/faq.mdindex d1558886ea..994a944d4f 100644--- a/docs/faq.md+++ b/docs/faq.md@@ -259,6 +259,49 @@ Current limitation (#179). Workarounds:2. Edit database directly3. Use environment variables+### How do I use OpenRouter?++[OpenRouter](https://openrouter.ai/) provides access to 100+ models through a single API. It uses an OpenAI-compatible API format.++**Quick Setup:**++1. **Get API Key**: Sign up at [openrouter.ai](https://openrouter.ai/) and generate an API key++2. **Configure via Web UI** (Recommended):+ - Navigate to Settings → LLM Provider+ - Select "Custom OpenAI Endpoint" (not "OpenRouter" - use the generic OpenAI endpoint option)+ - Set Endpoint URL: `https://openrouter.ai/api/v1`+ - Enter your OpenRouter API key+ - Select a model from the dropdown (it will auto-populate with OpenRouter models)++3. **Configure via Environment Variables** (for Docker/CI/CD):+ ```bash+ export LDR_LLM_PROVIDER=openai_endpoint+ export LDR_LLM_OPENAI_ENDPOINT_URL=https://openrouter.ai/api/v1+ export LDR_LLM_OPENAI_ENDPOINT_API_KEY=sk-or-v1-your-key-here+ export LDR_LLM_MODEL=anthropic/claude-3.5-sonnet+ ```++4. **Docker Compose Example**:+ ```yaml+ services:+ local-deep-research:+ environment:+ - LDR_LLM_PROVIDER=openai_endpoint+ - LDR_LLM_OPENAI_ENDPOINT_URL=https://openrouter.ai/api/v1+ - LDR_LLM_OPENAI_ENDPOINT_API_KEY=sk-or-v1-your-key-here+ - LDR_LLM_MODEL=anthropic/claude-3.5-sonnet+ ```++**Available Models**: Browse at [openrouter.ai/models](https://openrouter.ai/models)++**Common Issues**:+- **"Model not found"**: Ensure the model name exactly matches OpenRouter's format (e.g., `anthropic/claude-3.5-sonnet`)+- **Authentication errors**: Verify your API key is correct and has credits+- **Can't find OpenRouter in provider list**: Select "Custom OpenAI Endpoint" instead++See also: [Environment Variables Documentation](env_configuration.md#openrouter)+## Local Document Search### How do I configure local document paths?