openclaw/docs
Abhay 51e3d16be9
feat: Add Ollama provider with automatic model discovery (#1606)
* feat: Add Ollama provider with automatic model discovery

- Add Ollama provider builder with automatic model detection
- Discover available models from local Ollama instance via /api/tags API
- Make resolveImplicitProviders async to support dynamic model discovery
- Add comprehensive Ollama documentation with setup and usage guide
- Add tests for Ollama provider integration
- Update provider index and model providers documentation

Closes #1531

* fix: Correct Ollama provider type definitions and error handling

- Fix input property type to match ModelDefinitionConfig
- Import ModelDefinitionConfig type properly
- Fix error template literal to use String() for type safety
- Simplify return type signature of discoverOllamaModels

* fix: Suppress unhandled promise warnings from ensureClawdbotModelsJson in tests

- Cast unused promise returns to 'unknown' to suppress TypeScript warnings
- Tests that don't await the promise are intentionally not awaiting it
- This fixes the failing test suite caused by unawaited async calls

* fix: Skip Ollama model discovery during tests

- Check for VITEST or NODE_ENV=test before making HTTP requests
- Prevents test timeouts and hangs from network calls
- Ollama discovery will still work in production/normal usage

* fix: Set VITEST environment variable in test setup

- Ensures Ollama discovery is skipped in all test runs
- Prevents network calls during tests that could cause timeouts

* test: Temporarily skip Ollama provider tests to diagnose CI failures

* fix: Make Ollama provider opt-in to avoid breaking existing tests

**Root Cause:**
The Ollama provider was being added to ALL configurations by default
(with a fallback API key of 'ollama-local'), which broke tests that
expected NO providers when no API keys were configured.

**Solution:**
- Removed the default fallback API key for Ollama
- Ollama provider now requires explicit configuration via:
  - OLLAMA_API_KEY environment variable, OR
  - Ollama profile in auth store
- Updated documentation to reflect the explicit configuration requirement
- Added a test to verify Ollama is not added by default

This fixes all 4 failing test suites:
- checks (node, test, pnpm test)
- checks (bun, test, bunx vitest run)
- checks-windows (node, test, pnpm test)
- checks-macos (test, pnpm test)

Closes #1531
2026-01-24 22:38:52 +00:00
..
_layouts chore: normalize Clawdbot naming 2026-01-10 05:14:09 +01:00
assets docs: add X showcases 2026-01-13 04:41:01 +00:00
automation feat: add system cli 2026-01-24 04:03:07 +00:00
channels feat: add tlon channel plugin 2026-01-24 00:25:39 +00:00
cli feat: add node browser proxy routing 2026-01-24 04:21:47 +00:00
concepts feat: Add Ollama provider with automatic model discovery (#1606) 2026-01-24 22:38:52 +00:00
debug refactor: normalize cli command hints 2026-01-20 07:43:00 +00:00
experiments feat(gateway): implement OpenResponses /v1/responses endpoint phase 2 2026-01-20 07:37:01 +00:00
gateway fix: default direct gateway port + docs (#1603) (thanks @ngutman) 2026-01-24 21:10:54 +00:00
help docs: add verbose installer example 2026-01-24 22:38:13 +00:00
hooks test: expand soul-evil coverage 2026-01-18 06:39:26 +00:00
images docs: add group flow diagram 2026-01-10 20:05:22 +01:00
install docs: clarify beta promotion flow 2026-01-24 20:59:41 +00:00
nodes docs: update media auto-detect 2026-01-23 05:47:16 +00:00
platforms chore: bump 2026.1.24 2026-01-24 15:00:00 +00:00
plugins fix: keep core tools when allowlist is plugin-only 2026-01-23 09:02:17 +00:00
providers feat: Add Ollama provider with automatic model discovery (#1606) 2026-01-24 22:38:52 +00:00
refactor fix: harden outbound mirroring normalization 2026-01-24 12:57:58 +00:00
reference feat(templates): add emoji reactions guidance to AGENTS.md (#1591) 2026-01-24 13:12:16 +00:00
start docs: consolidate faq under help 2026-01-24 09:49:38 +00:00
tools fix: cover elevated ask approvals (#1636) 2026-01-24 21:12:46 +00:00
web fix: harden Mattermost plugin gating (#1428) (thanks @damoahdominic) 2026-01-23 01:23:23 +00:00
_config.yml refactor!: rename chat providers to channels 2026-01-13 08:40:39 +00:00
bedrock.md docs: add EC2 instance role setup for Bedrock (#1625) 2026-01-24 21:17:21 +00:00
brave-search.md refactor: split web tools and docs 2026-01-18 01:42:54 +00:00
broadcast-groups.md docs: complete channels rename sweep 2026-01-13 08:40:39 +00:00
CNAME chore: rename project to clawdbot 2026-01-04 14:38:51 +00:00
date-time.md perf: stabilize system prompt time 2026-01-24 06:24:04 +00:00
debugging.md docs: align node transport with gateway ws 2026-01-22 23:10:09 +00:00
docs.json docs: fix redirects and help links 2026-01-24 10:21:05 +00:00
environment.md docs: consolidate faq under help 2026-01-24 09:49:38 +00:00
hooks.md docs: mention tool_result_persist hook 2026-01-20 09:36:10 +00:00
index.md fix: harden Mattermost plugin gating (#1428) (thanks @damoahdominic) 2026-01-23 01:23:23 +00:00
logging.md fix: align rolling logs to local time 2026-01-22 07:02:52 +00:00
multi-agent-sandbox-tools.md feat: auto-recreate sandbox containers on config change 2026-01-19 01:35:27 +00:00
network.md docs: align node transport with gateway ws 2026-01-22 23:10:09 +00:00
perplexity.md fix: infer perplexity baseUrl from api key 2026-01-20 07:27:32 +00:00
plugin.md fix: address code review findings for plugin command API 2026-01-24 06:28:22 +00:00
prose.md docs: fix lobster links 2026-01-23 02:51:33 +00:00
scripts.md fix: add git hook setup and stable config hash sorting 2026-01-19 02:02:17 +00:00
testing.md Docs: frame skills eval gap in testing 2026-01-20 09:37:59 +00:00
token-use.md feat: add auth-aware cache defaults 2026-01-21 20:23:39 +00:00
tts.md fix: avoid Discord /tts conflict 2026-01-24 09:58:06 +00:00
tui.md fix: handle gateway slash command replies in TUI 2026-01-23 19:48:22 +00:00
whatsapp-clawd.jpg Add WhatsApp screenshot to claude-config.md 2025-11-27 18:43:24 +01:00