# Ollama models



Cluster Build can use an Ollama server that is reachable over HTTP. Configure
one named provider in `~/.cluster/config.toml`. The default provider only sets
the startup selection; `/model` also lists Cluster models and every reachable
configured Ollama provider:

```toml
default_model_provider = "gpuserver"
default_model = "qwen3.5:9b"

[model_providers.gpuserver]
kind = "ollama"
base_url = "http://gpuserver:11434"
```

For Ollama running on the same computer, a typical provider is:

```toml
[model_providers.local]
kind = "ollama"
base_url = "http://127.0.0.1:11434"
```

`base_url` is the host root; Cluster Build appends `/v1`. Ollama providers are
keyless, so starting the TUI does not require a Cluster login and requests do
not carry Cluster credentials. The existing `/model` picker lists the models
returned by that server's `/v1/models` endpoint.

Ollama must listen on an address reachable from the client. Keep port `11434`
limited to the trusted private network because Ollama does not authenticate
these requests.

## Context length [#context-length]

Coding-agent prompts and tool schemas require a much larger context than
Ollama's 4K default on GPUs with less than 24 GiB of VRAM. Configure at least
32K before starting Ollama, then confirm the active allocation with `ollama ps`:

```ini
[Service]
Environment="OLLAMA_CONTEXT_LENGTH=32768"
```

## Known limits [#known-limits]

Cluster Build disables Ollama thinking for this first provider slice so a tool
follow-up always produces a visible assistant answer. Reasoning controls are
not exposed for Ollama yet.

## Switching providers [#switching-providers]

Selecting a model from another provider clears history and starts a new
session before changing request routing. Switching to Cluster authenticates
when needed; switching to Ollama remains keyless. Resuming a local session
only requires its named provider to remain configured.

## Next steps [#next-steps]

* **[Advanced configuration](/docs/build/config/advanced)** — the rest of
  `config.toml`, including the `[model_providers]` table.
* **[Interactive sessions](/docs/build/interactive)** — the `/model` picker
  and other slash commands.
