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.

feat: Update default search engine option to 'auto' in settings and UI

hashedvikingbd57e421ee0b
diff --git a/src/local_deep_research/web/database/migrations.py b/src/local_deep_research/web/database/migrations.py
index f931e1ebde..8a213c5136 100644
--- a/src/local_deep_research/web/database/migrations.py
+++ b/src/local_deep_research/web/database/migrations.py
@@ -132,12 +132,13 @@ def setup_predefined_settings(db_session):
"category": "search_general",
"ui_element": "select",
"options": [
+ {"value": "auto", "label": "Auto (Default)"},
{"value": "google_pse", "label": "Google Programmable Search Engine"},
{"value": "searxng", "label": "SearXNG (Self-hosted)"},
{"value": "serpapi", "label": "SerpAPI (Google)"},
{"value": "duckduckgo", "label": "DuckDuckGo"}
],
- "value": "google_pse"
+ "value": "auto"
},
{
"key": "search.max_results",
diff --git a/src/local_deep_research/web/static/js/components/research.js b/src/local_deep_research/web/static/js/components/research.js
index 559b3908b6..b13e257a70 100644
--- a/src/local_deep_research/web/static/js/components/research.js
+++ b/src/local_deep_research/web/static/js/components/research.js
@@ -418,6 +418,7 @@
// Set default options in case API call fails
const defaultOptions = [
+ { value: 'auto', label: 'Auto (Default)' },
{ value: 'google_pse', label: 'Google Programmable Search Engine' },
{ value: 'searxng', label: 'SearXNG (Self-hosted)' },
{ value: 'serpapi', label: 'SerpAPI (Google)' },
@@ -425,7 +426,7 @@
];
// Start with default options
- populateSelectWithOptions(searchEngineSelect, defaultOptions, 'google_pse');
+ populateSelectWithOptions(searchEngineSelect, defaultOptions, 'auto');
// Try to get search engine options from API
fetch('/research/api/available-search-engines')
@@ -435,8 +436,20 @@
})
.then(data => {
if (data.engine_options && data.engine_options.length > 0) {
- // Use engine options if available
- populateSelectWithOptions(searchEngineSelect, data.engine_options, searchEngineSelect.value);
+ // Ensure 'auto' is the first option if it exists
+ const autoOption = data.engine_options.find(opt => opt.value === 'auto');
+ if (autoOption) {
+ // Remove auto from its current position
+ data.engine_options = data.engine_options.filter(opt => opt.value !== 'auto');
+ // Add it back as the first option
+ data.engine_options.unshift(autoOption);
+ } else {
+ // If 'auto' doesn't exist in the options, add it
+ data.engine_options.unshift({ value: 'auto', label: 'Auto (Default)' });
+ }
+
+ // Always use 'auto' as the default value
+ populateSelectWithOptions(searchEngineSelect, data.engine_options, 'auto');
}
// Also get the current setting value
@@ -447,14 +460,15 @@
return response.json();
})
.then(data => {
- // Find search engine setting
+ // Simply log the server's default value but don't apply it
+ // This ensures we always keep 'auto' as the default
const searchEngineSetting = data?.settings?.['search.tool'];
- if (searchEngineSetting) {
- // Update selection if needed
- const option = Array.from(searchEngineSelect.options).find(opt => opt.value === searchEngineSetting);
- if (option) {
- option.selected = true;
- }
+ console.log('Server default search engine:', searchEngineSetting);
+
+ // Override default with 'auto' regardless of server setting
+ const autoOption = Array.from(searchEngineSelect.options).find(opt => opt.value === 'auto');
+ if (autoOption) {
+ autoOption.selected = true;
}
})
.catch(error => {