Skip to main content

Ollama

Velaclaw integrates with Ollama’s native API (/api/chat) for hosted cloud models and local/self-hosted Ollama servers. You can use Ollama in three modes: Cloud + Local through a reachable Ollama host, Cloud only against https://ollama.com, or Local only against a reachable Ollama host.
Remote Ollama users: Do not use the /v1 OpenAI-compatible URL (http://host:11434/v1) with Velaclaw. This breaks tool calling and models may output raw tool JSON as plain text. Use the native Ollama API URL instead: baseUrl: "http://host:11434" (no /v1).

Getting started

Choose your preferred setup method and mode.

Cloud models

Cloud + Local uses a reachable Ollama host as the control point for both local and cloud models. This is Ollama’s preferred hybrid flow.Use Cloud + Local during setup. Velaclaw prompts for the Ollama base URL, discovers local models from that host, and checks whether the host is signed in for cloud access with ollama signin. When the host is signed in, Velaclaw also suggests hosted cloud defaults such as kimi-k2.5:cloud, minimax-m2.7:cloud, and glm-5.1:cloud.If the host is not signed in yet, Velaclaw keeps the setup local-only until you run ollama signin.

Model discovery (implicit provider)

When you set OLLAMA_API_KEY (or an auth profile) and do not define models.providers.ollama, Velaclaw discovers models from the local Ollama instance at http://127.0.0.1:11434. This avoids manual model entries while keeping the catalog aligned with the local Ollama instance.
To add a new model, simply pull it with Ollama:
The new model will be automatically discovered and available to use.
If you set models.providers.ollama explicitly, auto-discovery is skipped and you must define models manually. See the explicit config section below.

Configuration

The simplest local-only enablement path is via environment variable:
If OLLAMA_API_KEY is set, you can omit apiKey in the provider entry and Velaclaw will fill it for availability checks.

Model selection

Once configured, all your Ollama models are available:
Velaclaw supports Ollama Web Search as a bundled web_search provider. Choose Ollama Web Search during velaclaw onboard or velaclaw configure --section web, or set:
For the full setup and behavior details, see Ollama Web Search.

Advanced configuration

Tool calling is not reliable in OpenAI-compatible mode. Use this mode only if you need OpenAI format for a proxy and do not depend on native tool calling behavior.
If you need to use the OpenAI-compatible endpoint instead (for example, behind a proxy that only supports OpenAI format), set api: "openai-completions" explicitly:
This mode may not support streaming and tool calling simultaneously. You may need to disable streaming with params: { streaming: false } in model config.When api: "openai-completions" is used with Ollama, Velaclaw injects options.num_ctx by default so Ollama does not silently fall back to a 4096 context window. If your proxy/upstream rejects unknown options fields, disable this behavior:
For auto-discovered models, Velaclaw uses the context window reported by Ollama when available, otherwise it falls back to the default Ollama context window used by Velaclaw.You can override contextWindow and maxTokens in explicit provider config:
Velaclaw treats models with names such as deepseek-r1, reasoning, or think as reasoning-capable by default.
No additional configuration is needed — Velaclaw marks them automatically.
Ollama is free and runs locally, so all model costs are set to $0. This applies to both auto-discovered and manually defined models.
The bundled Ollama plugin registers a memory embedding provider for memory search. It uses the configured Ollama base URL and API key.To select Ollama as the memory search embedding provider:
Velaclaw’s Ollama integration uses the native Ollama API (/api/chat) by default, which fully supports streaming and tool calling simultaneously. No special configuration is needed.
If you need to use the OpenAI-compatible endpoint, see the “Legacy OpenAI-compatible mode” section above. Streaming and tool calling may not work simultaneously in that mode.

Troubleshooting

Make sure Ollama is running and that you set OLLAMA_API_KEY (or an auth profile), and that you did not define an explicit models.providers.ollama entry:
Verify that the API is accessible:
If your model is not listed, either pull the model locally or define it explicitly in models.providers.ollama.
Check that Ollama is running on the correct port:
More help: Troubleshooting and FAQ.

Model providers

Overview of all providers, model refs, and failover behavior.

Model selection

How to choose and configure models.

Ollama Web Search

Full setup and behavior details for Ollama-powered web search.

Configuration

Full config reference.