Skip to main content

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 OpenAI chat/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.
Saving runs a live test message against the endpoint, so a successful save means the URL resolved, the key was accepted, and the model ID exists.
Before filling in the form, confirm the endpoint from a shell:
The id values in the response are exactly what belongs in Model Name.

Worked examples

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, so localhost 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:
Then recreate the backend so the change takes effect:
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.
Small local models frequently have weak tool calling or none at all. Unlike the hosted providers — where these features occasionally miss a step — an endpoint that doesn’t implement tools or response_format makes them fail outright. Choose a model whose documentation explicitly claims tool-calling support, and test a real conversation end to end before you put it in front of customers.
Practical checks after connecting:
  1. Ask something only your knowledge base can answer — confirms tool calling works.
  2. Let the conversation reach a point where lead capture should fire.
  3. Ask to speak to a human — confirms handoff.
If any of those silently do nothing, the model is the most likely cause. Try a larger one before debugging anything else.

Troubleshooting

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.
The Base URL field was left empty. It’s mandatory for OpenAI-compatible and unused by every other provider.
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.
The model isn’t calling tools. This is a model capability problem, not a configuration one — switch to a model that supports tool calling.
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