UX: No connection test / health-check button for Ollama (or other local LLM) in the settings UI before saving
Author: chirag127Created Jul 1, 2026Updated Sep 2, 2026
Summary
The Khoj settings page for local LLM configuration (Ollama, llama-cpp server) has no "Test Connection" button. Users must save the config and attempt a chat to discover whether the endpoint is reachable and the model name is correct.
Environment
- OS: Windows 11 Enterprise 10.0.26200
- Khoj self-hosted via Docker Desktop 4.79 (WSL2 backend)
- Ollama running natively on Windows (
http://host.docker.internal:11434)
Problem
- User enters Ollama base URL (
http://host.docker.internal:11434) and model name (llama3.2) in settings - Saves config — no immediate feedback
- Starts a chat — only then discovers the endpoint is unreachable (firewall, wrong port) or the model name is a typo
- No in-UI indicator distinguishes "connected but model missing" from "host unreachable" from "model loading"
This is especially problematic on Windows where host.docker.internal vs localhost vs WSL2 IP address confusion is common, and where Ollama's Windows service may not bind on the Docker-visible interface.
Requested feature
Add a "Test Connection" / "Verify" button adjacent to the Ollama URL + model fields in the settings UI. On click:
- Hit
GET <base_url>/api/tags(Ollama health endpoint) - Show inline success ("Connected — 4 models available") or error ("Connection refused at http://...:11434")
- If connected, populate a dropdown of available model names instead of free-text input
Use case
Self-hosting Khoj to index personal notes for MCP knowledge source in coding agents; local LLM config needs to be verifiable without a round-trip through the chat UI.
Source: khoj-ai/khoj