Provider selection
Loach is a chat client, not a model. Out of the box it speaks two protocols: Ollama for local models running on your machine, and any OpenAI-compatible endpoint for hosted or self-hosted services. You can keep both wired up at once and switch between them at will.
Local: Ollama
The default backend. Loach talks to a local ollama serve process over HTTP and refreshes the model list automatically when you open the providers panel. If Ollama is not running, the panel surfaces a soft “start ollama serve” hint instead of erroring noisily.
When the chosen model supports them, streaming, multimodal images and thinking-mode reasoning are passed through to the daemon without extra configuration. By default Loach assumes Ollama is on localhost — change the base URL in Settings → Providers if it lives on another machine or port.
Cloud or self-hosted: OpenAI-compatible
Any endpoint that implements /v1/chat/completions works. That includes the real OpenAI API, plus vLLM, LM Studio, LiteLLM, OpenRouter, Groq and other proxies. Set the base URL and API key in Settings → Providers; the catalog is fetched on demand. If no key is configured the panel hides itself rather than spam failed requests.
A presets dropdown next to the base URL field one-clicks the URL to the documented endpoint for OpenAI, llama.cpp (llama-server), LM Studio, vLLM, or LiteLLM — handy when you switch between local proxies and hosted services.
API keys are saved into the OS credential store, not written into the SQLite database in plaintext, and never shipped to the renderer process. If you remove a key, the cached catalog is forgotten.
Test connection
Each provider section exposes a one-click probe so you can verify a base URL (and API key) before opening a chat:
- Ollama — pings
/api/tagsand reports the daemon version and visible model count, or a readable error if it cannot reach the URL. - OpenAI-compatible — calls the endpoint’s
/modelslisting with the stored key and reports the model count or a readable error. Disabled while there is an unsaved key still in the input.
The model picker
Every chat has a model dropdown in its header that lists both providers’ catalogs side-by-side, grouped by name. Picking a model:
- Persists onto the chat — reloading the app remembers which model that chat last used.
- Updates the “most recent” pair — used by Default model → Use most recent when starting fresh chats.
- Unloads the old model — for Ollama, the previous model is released from VRAM and the new one’s parameter cache is warmed for the parameters sidebar.
You can switch providers mid-conversation. The chat keeps its full message history; only future replies use the new model. Use this freely to compare answers across models without copy-pasting context.