
























@@ -15,11 +15,26 @@ OpenClaw integrates with Ollama's native API (`/api/chat`) for hosted cloud mode
15151616Ollama provider config uses `baseUrl` as the canonical key. OpenClaw also accepts `baseURL` for compatibility with OpenAI SDK-style examples, but new config should prefer `baseUrl`.
171718-Local and LAN Ollama hosts do not need a real bearer token; OpenClaw uses the local `ollama-local` marker only for loopback, private-network, `.local`, and bare-hostname Ollama base URLs. Remote public hosts and Ollama Cloud (`https://ollama.com`) require a real credential through `OLLAMA_API_KEY`, an auth profile, or the provider's `apiKey`.
18+### Auth rules
191920-Custom provider ids that set `api: "ollama"` use the same auth rules. For example, an `ollama-remote` provider that points at a private LAN Ollama host can use `apiKey: "ollama-local"` and sub-agents will resolve that marker through the Ollama provider hook instead of treating it as a missing credential.
20+<AccordionGroup>
21+<Accordion title="Local and LAN hosts">
22+Local and LAN Ollama hosts do not need a real bearer token. OpenClaw uses the local `ollama-local` marker only for loopback, private-network, `.local`, and bare-hostname Ollama base URLs.
23+</Accordion>
24+<Accordion title="Remote and Ollama Cloud hosts">
25+Remote public hosts and Ollama Cloud (`https://ollama.com`) require a real credential through `OLLAMA_API_KEY`, an auth profile, or the provider's `apiKey`.
26+</Accordion>
27+<Accordion title="Custom provider ids">
28+Custom provider ids that set `api: "ollama"` follow the same rules. For example, an `ollama-remote` provider that points at a private LAN Ollama host can use `apiKey: "ollama-local"` and sub-agents will resolve that marker through the Ollama provider hook instead of treating it as a missing credential.
29+</Accordion>
30+<Accordion title="Memory embedding scope">
31+When Ollama is used for memory embeddings, bearer auth is scoped to the host where it was declared:
213222-When Ollama is used for memory embeddings, bearer auth is scoped to the host where it was declared. A provider-level key is sent only to that provider's Ollama host; `agents.*.memorySearch.remote.apiKey` is sent only to its remote embedding host; and a pure `OLLAMA_API_KEY` env value is treated as the Ollama Cloud convention rather than being sent to local/self-hosted hosts by default.
33+- A provider-level key is sent only to that provider's Ollama host.
34+- `agents.*.memorySearch.remote.apiKey` is sent only to its remote embedding host.
35+- A pure `OLLAMA_API_KEY` env value is treated as the Ollama Cloud convention, not sent to local or self-hosted hosts by default.
36+</Accordion>
37+</AccordionGroup>
23382439## Getting started
2540@@ -485,7 +500,7 @@ For the full setup and behavior details, see [Ollama Web Search](/tools/ollama-s
485500ollama pull deepseek-r1:32b
486501```
487502488-No additional configuration is needed -- OpenClaw marks them automatically.
503+No additional configuration is needed. OpenClaw marks them automatically.
489504490505</Accordion>
491506@@ -607,7 +622,7 @@ More help: [Troubleshooting](/help/troubleshooting) and [FAQ](/help/faq).
607622## Related
608623609624<CardGroup cols={2}>
610-<Card title="Model selection" href="/concepts/model-providers" icon="layers">
625+<Card title="Model providers" href="/concepts/model-providers" icon="layers">
611626Overview of all providers, model refs, and failover behavior.
612627</Card>
613628<Card title="Model selection" href="/concepts/models" icon="brain">
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。