Files
openclaw/docs/providers/ollama-cloud.md
Vito Cappello 4fdfb8b1bf fix(ollama): carry real Ollama Cloud context windows and capabilities (#126653)
* fix(ollama): carry real Ollama Cloud context windows and capabilities

The ollama-cloud catalog still described three models (minimax-m2.7, glm-5.1,
glm-5.2) plus a retired kimi-k2.5. Every other cloud model — including kimi-k3,
the current flagship — was absent, so core synthesized it at the generic
DEFAULT_CONTEXT_TOKENS of 200k. A kimi-k3 session therefore ran with 200,000 of
its real 1,048,576 token window: 80% of the context silently discarded, with no
warning anywhere in the product.

Describe the full current cloud lineup with context windows, input modalities
and reasoning support verified against live /api/show and the ollama.com model
pages. Only mistral-large-3 lacks thinking (vision + tools + cloud only).

Suffixed refs shared the same defect from the other side: the default lookup is
keyed bare, so `kimi-k3:cloud` missed it and fell to the 128k plugin default.
A hardcoded glm-5.2 literal in buildOllamaModelDefinition had been papering over
that for exactly one model; replace it with a lookup through the canonical
cloud-id normalizer, which model-reasoning.ts already owned, and drop the
duplicate spelling of that helper.

* fix(ollama): cover exact cloud catalog variants

* fix(ollama): remove invalid cloud aliases

* fix(ollama): default Ollama Cloud onboarding to minimax-m3

Cloud onboarding derives `defaultModel` from the first entry of
OLLAMA_CLOUD_DEFAULT_MODELS, so array order silently owned the out-of-box
model choice. Put minimax-m3 (524,288 ctx, thinking + tools + vision) at
index 0, add it to the bundled rows it was missing from, and document the
ordering contract at the declaration.

Pin the resolved default id in the cloud setup tests so a reorder cannot
move it unnoticed, and align the provider doc's onboarding default and
fallback row list.

Claude-Session: https://claude.ai/code/session_01QXUQuDVataA5o16kxNnmoX

* fix(ollama): preserve default and shared model contracts

* test(ollama): consolidate cloud setup capability expectations

---------

Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-20 08:46:39 -07:00

4.2 KiB

summary, read_when, title
summary read_when title
Use Ollama Cloud directly with OpenClaw
You want to use hosted Ollama models without a local Ollama server
You need the ollama-cloud provider id, key, or endpoint
Ollama Cloud

Ollama Cloud is Ollama's hosted model API. The ollama-cloud provider calls it directly at https://ollama.com over Ollama's native /api/chat API, with no local Ollama server and no local Ollama app signed into cloud mode. Use model refs like ollama-cloud/kimi-k2.6.

OpenClaw registers ollama-cloud as its own provider id so cloud-only credentials, live catalog discovery, and model selection do not get mixed with a local ollama host. For local Ollama, hybrid cloud-plus-local routing, embeddings, and custom host details, see Ollama.

Setup

Follow Ollama's API key instructions, then run:

openclaw onboard --auth-choice ollama-cloud

Or set:

export OLLAMA_API_KEY="<your-ollama-cloud-api-key>" # pragma: allowlist secret

Non-interactive onboarding accepts the key directly:

openclaw onboard --auth-choice ollama-cloud --ollama-cloud-api-key "<key>"

Onboarding sets the default model to ollama-cloud/minimax-m2.7.

Defaults

  • Provider: ollama-cloud
  • Base URL: https://ollama.com
  • Env var: OLLAMA_API_KEY
  • API style: Ollama native /api/chat
  • Onboarding default model: ollama-cloud/minimax-m2.7

When to choose Ollama Cloud

  • You want hosted Ollama models without running ollama serve locally.
  • You want the same native Ollama chat API shape OpenClaw uses for local Ollama, but pointed at https://ollama.com.
  • You want a simple cloud path for models that are already in Ollama's hosted catalog.
  • You do not need local model pulls, local GPU control, or LAN-only inference.

Use Ollama instead when you want local-only or cloud-plus-local routing through a signed-in Ollama host. Use an OpenAI-compatible provider instead when you need /v1/chat/completions semantics or provider-specific OpenAI-style features.

Models

The provider requires an API key; without one it stays inactive. With a key, OpenClaw discovers Ollama Cloud models live from the hosted catalog:

openclaw models list --provider ollama-cloud
openclaw models set ollama-cloud/kimi-k2.6

Hosted ids in the live catalog include deepseek-v4-flash, glm-5.2, gpt-oss:20b, kimi-k3, and minimax-m3. When live discovery returns nothing, OpenClaw falls back to the bundled rows minimax-m2.7, minimax-m3, kimi-k3, glm-5.1, and glm-5.2. Retired kimi-k2.5 remains marked deprecated for existing exact references, but is no longer a current hosted model.

Model ids are cloud catalog ids, not local pull names. If a model name works in a local Ollama host but is absent from the hosted catalog, use the ollama provider with that local host instead.

Live test

For Ollama Cloud API-key smoke tests, point the Ollama live test at the hosted endpoint and choose a model from your current catalog:

export OLLAMA_API_KEY="<your-ollama-cloud-api-key>" # pragma: allowlist secret

OPENCLAW_LIVE_TEST=1 \
OPENCLAW_LIVE_OLLAMA=1 \
OPENCLAW_LIVE_OLLAMA_BASE_URL=https://ollama.com \
OPENCLAW_LIVE_OLLAMA_MODEL=kimi-k2.6 \
pnpm test:live -- extensions/ollama/ollama.live.test.ts

The cloud smoke runs text, native stream, and web search; set OPENCLAW_LIVE_OLLAMA_WEB_SEARCH=0 to skip web search. It skips embeddings by default for https://ollama.com because Ollama Cloud API keys may not authorize /api/embed; force them with OPENCLAW_LIVE_OLLAMA_EMBEDDINGS=1.

Troubleshooting

  • Ollama Cloud requires an API key / Set OLLAMA_API_KEY errors: provide a real cloud API key. The local ollama-local marker is only for local or private Ollama hosts.
  • Unknown model errors: run openclaw models list --provider ollama-cloud and copy the hosted model id exactly.
  • Tool-call or raw JSON issues on custom Ollama hosts: check whether you are accidentally using an OpenAI-compatible /v1 URL. Ollama routes should use the native base URL with no /v1 suffix.