openclaw - 💡(How to fix) Fix [Feature]: Auto-discover local Ollama instance and pre-register models on startup [1 comments, 2 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#61656Fetched 2026-04-08 02:56:21
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1labeled ×1

On startup, probe localhost:11434 for a running Ollama instance and automatically register detected models into the gateway's model registry.

Root Cause

On startup, probe localhost:11434 for a running Ollama instance and automatically register detected models into the gateway's model registry.

RAW_BUFFERClick to expand / collapse

Summary

On startup, probe localhost:11434 for a running Ollama instance and automatically register detected models into the gateway's model registry.

Problem to solve

Users running OpenClaw with local models via Ollama must manually configure the provider URL, set credentials, and add each model by hand. This creates unnecessary friction for anyone who wants a local-first, privacy-preserving setup — which is arguably OpenClaw's core value proposition.

If OpenClaw is already running on the same machine as Ollama (or inside WSL2), it should be able to detect the service silently on startup and surface available models without any YAML/JSON editing.

Proposed solution

  1. Startup probe: send a lightweight GET to http://localhost:11434/api/tags (and optionally a configurable list of ports/hosts ) during gateway init.
  2. Auto-register provider: if a 200 response is received, create or update an ollama-local provider entry in the gateway state — no user action required.
  3. Model sync: parse the response to extract pulled model names (e.g. llama3, qwen2.5, deepseek-r1) and add them to the selectable model list.
  4. UI hint: surface local providers first in the model selector so users immediately see their local models at the top.

A configurable flag (e.g. ollama.autoDiscover: false) should allow users to opt out if they run Ollama on a non-default port or prefer manual setup.

Alternatives considered

No response

Impact

MateClaw v1.0.101 ships this exact feature: auto-detects a local Ollama instance on startup, pre-configures six popular models (Qwen3, Llama, DeepSeek, Gemma, Phi, Mistral), and sorts local providers first in the model management UI.

Release reference: https://github.com/matevip/mateclaw/releases/tag/v1.0.101

Evidence/examples

No response

Additional information

No response

extent analysis

TL;DR

Implement an auto-discovery feature in OpenClaw to detect a local Ollama instance on startup and automatically register available models.

Guidance

  • Send a GET request to http://localhost:11434/api/tags during gateway initialization to probe for a running Ollama instance.
  • If a 200 response is received, create or update an ollama-local provider entry in the gateway state and parse the response to extract model names.
  • Add a configurable flag (e.g., ollama.autoDiscover) to allow users to opt out of auto-discovery if needed.
  • Surface local providers first in the model selector to prioritize local models.

Example

No explicit code example is provided, but the proposed solution outlines the necessary steps for implementation.

Notes

The implementation details may vary depending on the specific requirements and constraints of the OpenClaw and Ollama systems. The proposed solution is inspired by the feature implemented in MateClaw v1.0.101.

Recommendation

Apply the proposed auto-discovery workaround to enhance the user experience for local-first, privacy-preserving setups. This approach allows for seamless detection and registration of local Ollama models, aligning with OpenClaw's core value proposition.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING