Local inference: Ollama, vLLM, SGLang
Run a self-hosted Gamut on models you serve yourself, with an Ollama connection or a Generic connection to vLLM, SGLang or any OpenAI-compatible server.
- Self-hosted
A self-hosted Gamut can run its AI teammates on models you serve on your own hardware. Tokens never leave your network and there's no per-token bill. There are two ways in:
| Your server | Connection to add | Why |
|---|---|---|
| Ollama | Ollama | Gamut finds Ollama, downloads models for you, and adds every tool-capable model automatically. |
| vLLM, SGLang, LiteLLM, or any server with an OpenAI or Anthropic API | Generic | Works with any compatible endpoint. You add the models yourself. |
On a laptop or desktop, use the desktop app instead: see Run local models with Ollama.
Make sure agents can reach the server
Two things talk to your model server: the Gamut server, which checks it and lists models, and each agent, which runs in its own container and sends the actual requests. Both must reach the address you enter.
- Use a full hostname or an IP address, such as
http://gpu01.internal.example.com:8000orhttp://10.0.4.12:11434. Short names likegpuboxare rejected: they may resolve on the host, but agent containers can't resolve them. localhostis fine when the model server runs on the same machine as Gamut. Gamut rewrites it so agent containers reach the host (host.docker.internal). The Docker Compose file in the quick start runs Gamut on the host network, solocalhostreaches the host there too.- On Linux, bind the model server to more than loopback. Agent containers reach the host over Docker's bridge, which a server listening only on
127.0.0.1refuses. For Ollama, start it withOLLAMA_HOST=0.0.0.0; for vLLM or SGLang, make sure--hostisn't set to127.0.0.1(use--host 0.0.0.0). Keep the port firewalled from the internet. - On Kubernetes, point at the model server's service by its full DNS name, such as
http://vllm.inference.svc.cluster.local:8000.
Ollama
Ollama 0.14 or newer is required.
Add the connection
Open Settings → Model Providers, click Add connection, and choose Ollama. Gamut looks for Ollama at
http://localhost:11434on the machine running the workspace.If Ollama runs elsewhere, open Set up connection, enter the Ollama address, and click Test connection.
Install or start Ollama if needed
- Ollama wasn't found on the machine running this workspace: on Linux, run the install command shown (
curl -fsSL https://ollama.com/install.sh | sh), then start Ollama. - Ollama is installed but not running: run
ollama serve. - Can't reach Ollama: check that it's running at that address and listening where Gamut can reach it (
OLLAMA_HOST).
The panel updates on its own once Ollama answers, and shows Ollama is running.
- Ollama wasn't found on the machine running this workspace: on Linux, run the install command shown (
Download models
Click Download models, enter a model name from ollama.com, such as
qwen3.8:27b, and click Download. Agents need a model that supports tools. Only admins can download models; everyone else sees View models.Save
Click Save. Every downloaded model that supports tools joins the connection's catalog automatically.
If Gamut warns that a model loaded with a small context, restart Ollama with OLLAMA_CONTEXT_LENGTH=64000. Agents need at least 32,768 tokens, and Ollama silently cuts off whatever doesn't fit.
vLLM, SGLang and other OpenAI-compatible servers
Serve the model with tool calling turned on: agents work entirely through tools. In vLLM that means --enable-auto-tool-choice with the --tool-call-parser for your model; in SGLang, --tool-call-parser. Give the model enough context for agent work, ideally 64k tokens or more.
Add a Generic connection
Open Settings → Model Providers, click Add connection, and choose Generic ("Any Anthropic- or OpenAI-compatible endpoint at a base URL"). Give it a Connection name, such as "Local vLLM server".
Enter an API key
Enter the key your server expects. Validate needs one, so if your server doesn't check keys, enter any placeholder.
Choose the API format
- OpenAI Chat Completions: most self-hosted servers, including vLLM and SGLang.
- OpenAI Responses: servers that support it.
- Anthropic Messages: servers that speak Anthropic's API.
For Chat Completions, keep Token limit parameter on
max_completion_tokens (OpenAI), or choosemax_tokens (legacy compatible endpoints)if your server rejects it.Enter the base URL
For the OpenAI formats, enter the server's address, for example
http://gpu01.internal.example.com:8000/v1. A bare address gets/v1added; any other path is used as entered. For Anthropic Messages, leave/v1off.Validate and save
Click Validate. Gamut lists the server's models to check the address and key. Then click Save.
Add your models
Edit the connection, open Advanced Settings → Model catalog, and click Add model. Search your server's models, or enter the Model ID it serves. You can also set a Display label, an Input price and Output price for cost estimates, and the Supported efforts. The first model you add becomes the connection's default.
Validation errors
| Message | Fix |
|---|---|
| "…is a bare hostname that agent containers cannot resolve…" | Use the full hostname or the IP address. |
| "Timed out after 15s — check the base URL is reachable." | Check the address, port and firewall from the Gamut host. |
| "Auth rejected (401)" or "(403)" | Check the API key. |
Use the models
Pick the connection and model in the composer's model picker, set it as an agent's default, or, as an admin, make it the App default in Settings → Model Providers. To let everyone use it, add it with Available to → Everyone.
Local connections don't have web search. If a session needs it, switch to a hosted model for that session.
Related
- Models and the model picker
- Model Providers: every connection setting, including environment variables and the model catalog.
- Runtime Setup: how agent containers run.