Common recipes
Replace model IDs with exact names fromollama list or
openclaw models list --provider ollama.
Local model with auto-discovery
Local model with auto-discovery
Ollama on the same machine as the Gateway, discovered automatically:Leave
models.providers.ollama unset to use the default local endpoint, or
configure a self-hosted endpoint with models: [] to keep discovery eligible.LAN Ollama host with manual models
LAN Ollama host with manual models
contextTokens caps OpenClaw’s active-input budget; params.num_ctx sets
Ollama’s request context. Keep them aligned when hardware cannot run the
model’s full advertised context.Ollama Cloud only
Ollama Cloud only
No local daemon, hosted models directly:For the dedicated
ollama-cloud provider id instead of this shape, see
Ollama Cloud.Cloud plus local through a signed-in daemon
Cloud plus local through a signed-in daemon
Multiple Ollama hosts
Multiple Ollama hosts
Custom provider IDs when running more than one Ollama server; each gets its
own host, models, auth, and timeout.OpenClaw strips the active provider prefix (falling back to a bare
ollama/ prefix) before calling Ollama, so ollama-large/qwen3.5:27b
reaches Ollama as qwen3.5:27b.Small local model profile
Small local model profile
Local Ollama models automatically use structured Tool Search
when Explicit
tools.toolSearch is unset. This keeps optional capabilities available
while loading their schemas only when needed. Setup does not enable lean mode.
App, interactive CLI, and non-interactive setup use a 32,768-token runtime
context, or the model’s native window if smaller. The advertised native window
is retained separately; known cloud routes keep their hosted context.
Large file reads use OpenClaw’s context-based paging. The native adapter
preserves those text pages and their continuation instructions; structured
fallback data is bounded separately.
Bound any explicit context override to what the host can support:tools.toolSearch settings take precedence, including false.
Tool Search does not change Ollama’s context or thinking mode. Ollama thinking
defaults to off; an explicit thinking setting can change that independently.
If you previously enabled localModelLean, set it to false to restore
optional tools while retaining automatic Tool Search.Use compat.supportsTools: false only when the model or server reliably
fails on tool schemas; it disables tool use entirely. For a deliberately
narrower agent, prefer tools.profile or a per-agent tool policy.Model selection
ollama-spark/qwen3:32b, OpenClaw strips that prefix before
calling Ollama, sending qwen3:32b.
For slow local models, prefer provider-scoped tuning before raising the whole
agent runtime timeout:
timeoutSeconds covers the model HTTP request: connection setup, headers,
body streaming, and the total guarded-fetch abort. params.keep_alive is
forwarded as top-level keep_alive on native /api/chat requests; set it per
model when first-turn load time is the bottleneck.
Quick verification
127.0.0.1 with the baseUrl host. If curl
works but OpenClaw does not, check whether the Gateway runs on a different
machine, container, or service account.