web_search provider,
returning titles, URLs, and snippets from Ollama’s web-search API.
Local/self-hosted Ollama needs no API key by default; it requires a reachable
Ollama host plus ollama signin. Direct hosted search (no local Ollama) needs
baseUrl: "https://ollama.com" and a real OLLAMA_API_KEY.
Setup
If you already use Ollama for models, Ollama Web Search reuses the same
configured host.
OpenClaw never auto-selects Ollama Web Search over a higher-priority
credentialed provider; you must choose it explicitly with
tools.web.search.provider: "ollama".Config
models.providers.ollama.baseUrl is the canonical key; the web-search
provider also accepts baseURL there for compatibility with OpenAI SDK-style
config examples. If nothing is set, OpenClaw defaults to
http://127.0.0.1:11434.
Direct hosted Ollama Web Search (no local Ollama):
Auth and request routing
- No web-search-specific API key field exists; the provider reuses
models.providers.ollama.apiKey(or the matching env-backed provider auth) when the configured host is auth-protected. - Host resolution order:
plugins.entries.ollama.config.webSearch.baseUrl→models.providers.ollama.baseUrl(orbaseURL) →http://127.0.0.1:11434. - If the resolved host is
https://ollama.com, OpenClaw callshttps://ollama.com/api/web_searchdirectly with the API key as bearer auth. - Otherwise OpenClaw calls the local proxy endpoint
/api/experimental/web_searchfirst (which signs and forwards to Ollama Cloud), then falls back to/api/web_searchon the same host. If both fail andOLLAMA_API_KEYis set, it retries once againsthttps://ollama.com/api/web_searchwith that key — without sending it to the local host. - OpenClaw warns during setup if Ollama is unreachable or not signed in, but does not block selecting the provider.
Related
- Web Search overview — all providers and auto-detection
- Ollama — Ollama model setup and cloud/local modes