~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
refactor: use is_cloud from provider metadata instead of hardcoded checks
LearningCircuit509a4928e706
diff --git a/src/local_deep_research/web/static/js/components/research.js b/src/local_deep_research/web/static/js/components/research.jsindex 30281ae4bd..54fae7a827 100644--- a/src/local_deep_research/web/static/js/components/research.js+++ b/src/local_deep_research/web/static/js/components/research.js@@ -85,6 +85,25 @@// Store available models by provider - will be populated dynamically from APIlet availableModels = {};+ /**+ * Check if a provider is a local provider (not cloud-based)+ * Uses the is_cloud attribute from provider metadata+ * @param {string} providerKey - The provider key (e.g., 'OLLAMA', 'LMSTUDIO')+ * @returns {boolean} - True if the provider is local (is_cloud === false)+ */+ function isLocalProvider(providerKey) {+ if (!providerKey) return false;+ const provider = MODEL_PROVIDERS.find(+ p => p.value && p.value.toUpperCase() === providerKey.toUpperCase()+ );+ // If provider found, check is_cloud; if not found, fall back to known local providers+ if (provider) {+ return provider.is_cloud === false;+ }+ // Fallback for when MODEL_PROVIDERS hasn't loaded yet+ return ['OLLAMA', 'LMSTUDIO', 'VLLM', 'LLAMACPP'].includes(providerKey.toUpperCase());+ }+/*** Initialize the research component*/@@ -636,10 +655,9 @@lmstudioUrlContainer.style.display = provider === 'LMSTUDIO' ? 'block' : 'none';}- // Show context window for local providers (OLLAMA or LMSTUDIO)+ // Show context window for local providersif (contextWindowContainer) {- const isLocalProvider = provider === 'OLLAMA' || provider === 'LMSTUDIO';- contextWindowContainer.style.display = isLocalProvider ? 'block' : 'none';+ contextWindowContainer.style.display = isLocalProvider(provider) ? 'block' : 'none';}// Update model options based on provider@@ -701,7 +719,6 @@if (lmstudioUrlInput) {lmstudioUrlInput.addEventListener('change', function() {const url = this.value;- console.log('LM Studio URL changed to:', url);saveSearchSetting('llm.lmstudio.url', url);});}@@ -709,8 +726,7 @@// Context window size change - save to settings managerif (contextWindowInput) {contextWindowInput.addEventListener('change', function() {- const size = parseInt(this.value);- console.log('Context window size changed to:', size);+ const size = parseInt(this.value, 10);saveSearchSetting('llm.local_context_window_size', size);});}@@ -819,11 +835,10 @@lmstudioUrlContainer.style.display = selectedProvider === 'LMSTUDIO' ? 'block' : 'none';}- // Show context window for local providers (OLLAMA or LMSTUDIO)+ // Show context window for local providersif (contextWindowContainer) {const selectedProvider = modelProviderSelect.value || initialProvider.toUpperCase();- const isLocalProvider = selectedProvider === 'OLLAMA' || selectedProvider === 'LMSTUDIO';- contextWindowContainer.style.display = isLocalProvider ? 'block' : 'none';+ contextWindowContainer.style.display = isLocalProvider(selectedProvider) ? 'block' : 'none';}// Initial update of model options@@ -1399,8 +1414,7 @@// Display context window container for local providersif (contextWindowContainer) {- const isLocalProvider = providerValue === 'OLLAMA' || providerValue === 'LMSTUDIO';- contextWindowContainer.style.display = isLocalProvider ? 'block' : 'none';+ contextWindowContainer.style.display = isLocalProvider(providerValue) ? 'block' : 'none';}}@@ -1425,7 +1439,6 @@const lmstudioUrlSetting = data.settings['llm.lmstudio.url'];if (lmstudioUrlSetting && lmstudioUrlInput) {const lmstudioUrlValue = lmstudioUrlSetting.value;- console.log('Current LM Studio URL:', lmstudioUrlValue);lmstudioUrlInput.value = lmstudioUrlValue;lmstudioUrlInput.disabled = !lmstudioUrlSetting.editable;}@@ -1434,7 +1447,6 @@const contextWindowSetting = data.settings['llm.local_context_window_size'];if (contextWindowSetting && contextWindowInput) {const contextWindowValue = contextWindowSetting.value;- console.log('Current context window size:', contextWindowValue);contextWindowInput.value = contextWindowValue;contextWindowInput.disabled = !contextWindowSetting.editable;}@@ -1622,8 +1634,7 @@}// Show/hide context window for local providersif (contextWindowContainer) {- const isLocalProvider = provider === 'OLLAMA' || provider === 'LMSTUDIO';- contextWindowContainer.style.display = isLocalProvider ? 'block' : 'none';+ contextWindowContainer.style.display = isLocalProvider(provider) ? 'block' : 'none';}}