Self-Hosted and Gateway Models
ChatterMate’s OpenAI-compatible provider points the whole product at an endpoint you control. Self-host the stack with Docker and self-host the model here, and no prompt, customer message, or knowledge-base excerpt ever leaves your infrastructure. The name describes the wire protocol, not a specific vendor: anything that serves the OpenAIchat/completions API works. That covers local runtimes (Ollama, vLLM,
llama.cpp) and multi-model gateways (OpenRouter, LiteLLM) alike.
What you configure
Three fields under Settings → AI Configuration, with the provider set to OpenAI-compatible (self-hosted, OpenRouter, Ollama…):1
Base URL
The root of your endpoint’s API, including the version segment — for example
http://host.docker.internal:11434/v1. This field appears only for this
provider. It must be reachable from the ChatterMate backend container.2
Model Name
There are no suggested models, because the catalog belongs to your server. Choose
“Custom model ID…” in the dropdown and type the exact ID your endpoint reports.
3
API Key
Always required. If your server doesn’t enforce auth, enter a placeholder such as
ollama — it’s sent as a bearer token and ignored.Worked examples
- Ollama
- vLLM
- llama.cpp
- OpenRouter
- LiteLLM
Ollama binds to loopback by default, so a container can’t reach it. Bind it to all
interfaces and restart it:Pull a model that supports tool calling, then list what you have:
Reaching your endpoint from Docker
The backend runs in a container, solocalhost in the Base URL means the backend
container itself — not your machine. Pick the form that matches where the model runs:
On Linux,
host.docker.internal isn’t defined by default. Add it to the backend
service in your Compose file:
Running ChatterMate outside Docker? Then
http://localhost:11434/v1 is correct as-is.Choosing a model
Every ChatterMate feature beyond plain replies is built on tool calling and structured output: knowledge-base search, lead capture, ending a resolved chat, human handoff, and MCP tools. Practical checks after connecting:- Ask something only your knowledge base can answer — confirms tool calling works.
- Let the conversation reach a point where lead capture should fire.
- Ask to speak to a human — confirms handoff.
Troubleshooting
Saving fails with "Invalid API key"
Saving fails with "Invalid API key"
The save runs a real request, so this error covers every way that request can fail
— an unreachable base URL and a non-existent model ID included. Check, in order:
the backend can reach the URL (
docker compose exec backend curl <base-url>/models),
the model ID appears in that response, and the key matches what the server expects."A base URL is required for the selected provider"
"A base URL is required for the selected provider"
The Base URL field was left empty. It’s mandatory for OpenAI-compatible and unused
by every other provider.
Connection refused from the backend container
Connection refused from the backend container
Either the server is bound to loopback only (start Ollama with
OLLAMA_HOST=0.0.0.0,
llama-server with --host 0.0.0.0), or localhost was used where
host.docker.internal or a Compose service name is needed. See
Reaching your endpoint from Docker.Replies work, but the agent never searches the knowledge base
Replies work, but the agent never searches the knowledge base
The model isn’t calling tools. This is a model capability problem, not a
configuration one — switch to a model that supports tool calling.
The Base URL field doesn't appear
The Base URL field doesn't appear
It renders only when OpenAI-compatible (self-hosted, OpenRouter, Ollama…) is the
selected provider. If bring-your-own-model is locked behind an upgrade prompt, the
form isn’t available on your plan.
AI Provider Configuration
Back to the full provider reference, including the seven hosted providers