~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
chore(settings): reduce default local_context_window_size 30208 -> 20480 (#3787)
LearningCircuit167a29ccd5ef
diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.mdindex a1b6b34da3..c76590fd9c 100644--- a/docs/CONFIGURATION.md+++ b/docs/CONFIGURATION.md@@ -118,7 +118,7 @@ They are not available in the Web UI because they are needed to start the applic| `llm.llamacpp.url` | `LDR_LLM_LLAMACPP_URL` | `http://localhost:8080/v1` | HTTP endpoint URL where llama.cpp's `llama-server` is running. Include the full path with /v1 (default: http://localhost:8080/v1). Run `llama-server -m <model.gguf>` to start it. | LLM || `llm.lmstudio.api_key` | `LDR_LLM_LMSTUDIO_API_KEY` | `` | Optional API key for LM Studio if you've enabled authentication. Leave empty for the default no-auth setup. | LLM || `llm.lmstudio.url` | `LDR_LLM_LMSTUDIO_URL` | `http://localhost:1234/v1` | HTTP endpoint URL where LM Studio is running locally. Include the full path (e.g., http://localhost:1234/v1 for OpenAI-compatible API format). | LLM |-| `llm.local_context_window_size` | `LDR_LLM_LOCAL_CONTEXT_WINDOW_SIZE` | `30208` | Context window size in tokens for local LLMs (Ollama, LlamaCpp, LM Studio). The default of 30208 tokens leaves more headroom for the synthesis prompt (sources + previous knowledge + instructions) so it is less likely to be truncated by the model. If you have limited VRAM, reduce this and switch to the source-based strategy instead. | LLM |+| `llm.local_context_window_size` | `LDR_LLM_LOCAL_CONTEXT_WINDOW_SIZE` | `20480` | Context window size in tokens for local LLMs (Ollama, LlamaCpp, LM Studio). The default of 20480 tokens fits on systems with limited VRAM while still leaving room for the synthesis prompt. If your synthesis prompts get truncated, increase this; if you run out of VRAM, reduce it and switch to the source-based strategy. | LLM || `llm.max_tokens` | `LDR_LLM_MAX_TOKENS` | `30000` | Maximum tokens in model responses. Automatically capped at 80% of the context window size to leave room for prompt tokens. | LLM || `llm.model` | `LDR_LLM_MODEL` | `` | The language model to use. Available models depend on the selected provider (e.g., 'gpt-4o' for OpenAI, 'gemma:7b' for Ollama). You can type any model name supported by your provider. | LLM || `llm.ollama.enable_thinking` | `LDR_LLM_OLLAMA_ENABLE_THINKING` | `true` | Enable thinking/reasoning mode for models like deepseek-r1 and qwen2.5. When enabled (recommended), the model performs internal reasoning for more accurate answers, but the reasoning content is automatically separated and excluded from the final response. When disabled, the model gives faster but potentially less accurate direct answers without reasoning. | LLM |diff --git a/src/local_deep_research/defaults/default_settings.json b/src/local_deep_research/defaults/default_settings.jsonindex e47cfff989..b531ac7bab 100644--- a/src/local_deep_research/defaults/default_settings.json+++ b/src/local_deep_research/defaults/default_settings.json@@ -438,7 +438,7 @@},"llm.local_context_window_size": {"category": "llm_parameters",- "description": "Context window size in tokens for local LLMs (Ollama, LlamaCpp, LM Studio). The default of 30208 tokens leaves more headroom for the synthesis prompt (sources + previous knowledge + instructions) so it is less likely to be truncated by the model. If you have limited VRAM, reduce this and switch to the source-based strategy instead.",+ "description": "Context window size in tokens for local LLMs (Ollama, LlamaCpp, LM Studio). The default of 20480 tokens fits on systems with limited VRAM while still leaving room for the synthesis prompt. If your synthesis prompts get truncated, increase this; if you run out of VRAM, reduce it and switch to the source-based strategy.","editable": true,"max_value": 131072.0,"min_value": 512.0,@@ -447,7 +447,7 @@"step": 512.0,"type": "LLM","ui_element": "number",- "value": 30208,+ "value": 20480,"visible": true},"llm.supports_max_tokens": {diff --git a/tests/settings/golden_master_settings.json b/tests/settings/golden_master_settings.jsonindex d74db8244c..711c95da59 100644--- a/tests/settings/golden_master_settings.json+++ b/tests/settings/golden_master_settings.json@@ -993,7 +993,7 @@},"llm.local_context_window_size": {"category": "llm_parameters",- "description": "Context window size in tokens for local LLMs (Ollama, LlamaCpp, LM Studio). The default of 30208 tokens leaves more headroom for the synthesis prompt (sources + previous knowledge + instructions) so it is less likely to be truncated by the model. If you have limited VRAM, reduce this and switch to the source-based strategy instead.",+ "description": "Context window size in tokens for local LLMs (Ollama, LlamaCpp, LM Studio). The default of 20480 tokens fits on systems with limited VRAM while still leaving room for the synthesis prompt. If your synthesis prompts get truncated, increase this; if you run out of VRAM, reduce it and switch to the source-based strategy.","editable": true,"max_value": 131072.0,"min_value": 512.0,@@ -1002,7 +1002,7 @@"step": 512.0,"type": "LLM","ui_element": "number",- "value": 30208,+ "value": 20480,"visible": true},"llm.max_tokens": {