openclaw - 💡(How to fix) Fix [Bug]: Ollama remote host autodiscovery impossible — schema validation contradicts documentation [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#70982Fetched 2026-04-24 10:37:09
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
labeled ×2

The documentation states autodiscovery activates when models.providers.ollama is not defined, but for remote Ollama hosts the schema validator rejects any config without a provider block, making autodiscovery structurally impossible for remote setups.

Root Cause

  1. Configure remote Ollama at a non-localhost address
  2. Attempt Option A — remove models.providers.ollama block entirely: Result: schema validates OK but discovery targets hardcoded 127.0.0.1:11434, cannot reach remote host
  3. Attempt Option B — keep provider block, remove models array: Result: schema validation FAILS: "models.providers.ollama.models: Invalid input: expected array, received undefined"
  4. Attempt Option C — keep provider block with models: []: Result: schema validates BUT autodiscovery disabled because explicit provider block exists
  5. Set plugins.entries.ollama.config.discovery.enabled: true: Result: no effect when explicit provider block is present

Fix Action

Fix / Workaround

Affected: All users running Ollama on a separate host from OpenClaw Severity: Medium — workaround exists (manual model enumeration) Frequency: 100% reproducible for any remote Ollama setup Consequence: Users must manually maintain model list in config; new models pulled to Ollama are not visible in OpenClaw UI until manually added to openclaw.json

RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

The documentation states autodiscovery activates when models.providers.ollama is not defined, but for remote Ollama hosts the schema validator rejects any config without a provider block, making autodiscovery structurally impossible for remote setups.

Steps to reproduce

  1. Configure remote Ollama at a non-localhost address
  2. Attempt Option A — remove models.providers.ollama block entirely: Result: schema validates OK but discovery targets hardcoded 127.0.0.1:11434, cannot reach remote host
  3. Attempt Option B — keep provider block, remove models array: Result: schema validation FAILS: "models.providers.ollama.models: Invalid input: expected array, received undefined"
  4. Attempt Option C — keep provider block with models: []: Result: schema validates BUT autodiscovery disabled because explicit provider block exists
  5. Set plugins.entries.ollama.config.discovery.enabled: true: Result: no effect when explicit provider block is present

Expected behavior

Per docs.openclaw.ai/providers/ollama (Custom base URL tab): a provider block with baseUrl and no models array should be valid config. Per the discovery section: autodiscovery should activate when no explicit models are defined. Remote host users should be able to get autodiscovery by specifying baseUrl without a models array.

Actual behavior

No configuration combination enables autodiscovery from a remote Ollama host:

  • Without provider block: discovery hardcoded to 127.0.0.1 (unreachable)
  • With provider block + no models array: schema validation fails
  • With provider block + models: []: discovery disabled by explicit provider block

openclaw models list --local always returns "No models found" regardless of configuration attempted.

Only working approach: manually enumerate all models in models array, defeating the purpose of autodiscovery.

Notable: When the OpenClaw agent uses its exec tool to directly query Ollama: curl http://192.168.40.22:11434/api/tags It successfully returns all 22 models. The remote host is reachable and the models are available — the failure is specifically in OpenClaw's autodiscovery mechanism, not in network connectivity or Ollama availability.

OpenClaw version

2026.4.22 (also reproduced on 2026.4.12)

Operating system

Ubuntu 24.04 (running as Unraid VM)

Install method

npm global

Model

ollama/qwen3.5:27b

Provider / routing chain

openclaw -> ollama (remote host 192.168.40.22:11434)

Additional provider/model setup details

Remote Ollama at http://192.168.40.22:11434 — confirmed reachable: curl http://192.168.40.22:11434/api/tags returns all 22 models correctly

openclaw models list --local: "No models found" (confirmed bug) openclaw models list: shows only models explicitly listed in agents.defaults.models plugins.entries.ollama.config.discovery.enabled: true — has no effect

Logs, screenshots, and evidence

Impact and severity

Affected: All users running Ollama on a separate host from OpenClaw Severity: Medium — workaround exists (manual model enumeration) Frequency: 100% reproducible for any remote Ollama setup Consequence: Users must manually maintain model list in config; new models pulled to Ollama are not visible in OpenClaw UI until manually added to openclaw.json

Additional information

Suggested fix options:

  1. Allow empty models: [] to trigger discovery against configured baseUrl instead of disabling discovery entirely
  2. Add plugins.entries.ollama.config.discovery.baseUrl override that takes precedence over hardcoded 127.0.0.1 default
  3. Update docs to accurately reflect that autodiscovery is not supported for remote Ollama hosts (if this is intentional behavior)

22 models confirmed available on remote Ollama via /api/tags — none are visible to OpenClaw without manual enumeration.

The OpenClaw agent itself can enumerate all 22 remote Ollama models via direct API call (curl /api/tags), confirming the remote host is fully reachable from the OpenClaw VM. This makes the autodiscovery failure purely a framework-level issue, not a network or Ollama configuration issue.

extent analysis

TL;DR

The most likely fix is to modify the OpenClaw configuration to allow autodiscovery for remote Ollama hosts by enabling discovery against the configured baseUrl when the models array is empty.

Guidance

  • Review the OpenClaw documentation to understand the intended behavior of autodiscovery with remote Ollama hosts and verify if it aligns with the current implementation.
  • Attempt to configure the plugins.entries.ollama.config.discovery.baseUrl override to point to the remote Ollama host and verify if it takes precedence over the hardcoded default.
  • Test the suggested fix option to allow an empty models: [] array to trigger discovery against the configured baseUrl instead of disabling discovery entirely.
  • If the above steps do not resolve the issue, consider manually enumerating the models in the config as a temporary workaround.

Example

No code snippet is provided as the issue is related to configuration and not a specific code implementation.

Notes

The issue seems to be specific to the OpenClaw configuration and autodiscovery mechanism, and not related to network connectivity or Ollama availability. The provided information suggests that the OpenClaw agent can directly query the remote Ollama host and retrieve the models, but the autodiscovery feature is not working as expected.

Recommendation

Apply a workaround by manually enumerating the models in the config until a permanent fix is available, as the issue is reproducible and affects all users running Ollama on a separate host from OpenClaw.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Per docs.openclaw.ai/providers/ollama (Custom base URL tab): a provider block with baseUrl and no models array should be valid config. Per the discovery section: autodiscovery should activate when no explicit models are defined. Remote host users should be able to get autodiscovery by specifying baseUrl without a models array.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Ollama remote host autodiscovery impossible — schema validation contradicts documentation [1 participants]