~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
fix(settings): remove duplicate LLAMACPP entry from model-provider dropdown (#4594)
LearningCircuit035c1314f9c4
diff --git a/src/local_deep_research/web/routes/settings_routes.py b/src/local_deep_research/web/routes/settings_routes.pyindex c745bb0a7d..33928ec140 100644--- a/src/local_deep_research/web/routes/settings_routes.py+++ b/src/local_deep_research/web/routes/settings_routes.py@@ -1341,18 +1341,11 @@ def api_get_available_models():# and configure providers they haven't set up yet)from ...llm.providers import get_discovered_provider_options+ # LlamaCppProvider is auto-discovered (provider_name="llama.cpp"), so+ # it is already included here. The previous hardcoded LLAMACPP append+ # produced a duplicate entry in the dropdown.provider_options = get_discovered_provider_options()- # Add remaining hardcoded providers (complex local providers not yet migrated)- provider_options.extend(- [- {- "value": "LLAMACPP",- "label": "Llama.cpp (Local GGUF files only)",- },- ]- )-# Available models by providerproviders: dict[str, Any] = {}diff --git a/tests/web/routes/test_settings_routes_gaps_coverage.py b/tests/web/routes/test_settings_routes_gaps_coverage.pyindex 48c35eddb3..2bd534017c 100644--- a/tests/web/routes/test_settings_routes_gaps_coverage.py+++ b/tests/web/routes/test_settings_routes_gaps_coverage.py@@ -721,3 +721,44 @@ class TestApiGetAvailableModels:assert resp.status_code == 200data = resp.get_json()assert "providers" in data++ def test_llamacpp_not_duplicated_in_provider_options(self):+ """LlamaCppProvider is auto-discovered, so the route must NOT add a+ second hardcoded LLAMACPP entry (regression for the duplicate+ dropdown entry)."""+ app = _create_test_app()++ @contextmanager+ def _fake_session(*a, **kw):+ yield MagicMock()++ discovered = [+ {"value": "OLLAMA", "label": "Ollama 💻 Local", "is_cloud": False},+ {+ "value": "LLAMACPP",+ "label": "llama.cpp 💻 Local",+ "is_cloud": False,+ },+ ]++ with _authenticated_client(app) as client:+ with (+ patch(+ f"{MODULE}.get_user_db_session", side_effect=_fake_session+ ),+ patch(+ "local_deep_research.llm.providers.get_discovered_provider_options",+ return_value=discovered,+ ),+ patch(f"{MODULE}.safe_get", return_value=Mock(status_code=404)),+ patch(f"{MODULE}._get_setting_from_session", return_value=None),+ ):+ resp = client.get(+ "/settings/api/available-models?force_refresh=true"+ )+ assert resp.status_code == 200+ data = resp.get_json()+ values = [opt["value"] for opt in data["provider_options"]]+ assert values.count("LLAMACPP") == 1+ # No provider value should be duplicated.+ assert len(values) == len(set(values))