openclaw - 💡(How to fix) Fix [Bug]: multiple ollama providers not working [1 participants]

Official PRs (…)
ON THIS PAGE

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#63441Fetched 2026-04-09 07:53:41
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×2subscribed ×1

I have this under models.provider: "bernard": { "baseUrl": "http://192.168.1.244:11434/", "apiKey": "ollama-bernard", "api": "ollama", "models": [ { "id": "VladimirGav/gemma4-26b-16GB-VRAM", "name": "VladimirGav/gemma4-26b-16GB-VRAM", "reasoning": false, "input": [ "text" ], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 32768 } ] },

I have then added it as an allowed model under agents.defaults.models "bernard/VladimirGav/gemma4-26b-16GB-VRAM": {}

I then pick the model on discord by the command /model and when typing anything I get this in response: No API provider registered for api: ollama

However if I changed api to "openai-completions" and added "/v1" on baseUrl I was able to get responses.

But the bot seemed off. Inspecting ollama logs gave me this: ollama | time=2026-04-09T00:01:14.407Z level=WARN source=runner.go:187 msg="truncating input prompt" limit=8192 prompt=20397 keep=4 new=8192

And then I found this note:

Remote Ollama users: Do not use the /v1 OpenAI-compatible URL (http://host:11434/v1) with OpenClaw. This breaks tool calling and models may output raw tool JSON as plain text. Use the native Ollama API URL instead: baseUrl: "http://host:11434" (no /v1).

on https://docs.openclaw.ai/providers/ollama

If I just use one ollama provider it works but I want to be able to select between different providers

Error Message

ollama | time=2026-04-09T00:01:14.407Z level=WARN source=runner.go:187 msg="truncating input prompt" limit=8192 prompt=20397 keep=4 new=8192

Root Cause

I have this under models.provider: "bernard": { "baseUrl": "http://192.168.1.244:11434/", "apiKey": "ollama-bernard", "api": "ollama", "models": [ { "id": "VladimirGav/gemma4-26b-16GB-VRAM", "name": "VladimirGav/gemma4-26b-16GB-VRAM", "reasoning": false, "input": [ "text" ], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 32768 } ] },

I have then added it as an allowed model under agents.defaults.models "bernard/VladimirGav/gemma4-26b-16GB-VRAM": {}

I then pick the model on discord by the command /model and when typing anything I get this in response: No API provider registered for api: ollama

However if I changed api to "openai-completions" and added "/v1" on baseUrl I was able to get responses.

But the bot seemed off. Inspecting ollama logs gave me this: ollama | time=2026-04-09T00:01:14.407Z level=WARN source=runner.go:187 msg="truncating input prompt" limit=8192 prompt=20397 keep=4 new=8192

And then I found this note:

Remote Ollama users: Do not use the /v1 OpenAI-compatible URL (http://host:11434/v1) with OpenClaw. This breaks tool calling and models may output raw tool JSON as plain text. Use the native Ollama API URL instead: baseUrl: "http://host:11434" (no /v1).

on https://docs.openclaw.ai/providers/ollama

If I just use one ollama provider it works but I want to be able to select between different providers

Code Example

Remote Ollama users: Do not use the /v1 OpenAI-compatible URL (http://host:11434/v1) with OpenClaw. This breaks tool calling and models may output raw tool JSON as plain text. Use the native Ollama API URL instead: baseUrl: "http://host:11434" (no /v1).

---
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

I have this under models.provider: "bernard": { "baseUrl": "http://192.168.1.244:11434/", "apiKey": "ollama-bernard", "api": "ollama", "models": [ { "id": "VladimirGav/gemma4-26b-16GB-VRAM", "name": "VladimirGav/gemma4-26b-16GB-VRAM", "reasoning": false, "input": [ "text" ], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 32768 } ] },

I have then added it as an allowed model under agents.defaults.models "bernard/VladimirGav/gemma4-26b-16GB-VRAM": {}

I then pick the model on discord by the command /model and when typing anything I get this in response: No API provider registered for api: ollama

However if I changed api to "openai-completions" and added "/v1" on baseUrl I was able to get responses.

But the bot seemed off. Inspecting ollama logs gave me this: ollama | time=2026-04-09T00:01:14.407Z level=WARN source=runner.go:187 msg="truncating input prompt" limit=8192 prompt=20397 keep=4 new=8192

And then I found this note:

Remote Ollama users: Do not use the /v1 OpenAI-compatible URL (http://host:11434/v1) with OpenClaw. This breaks tool calling and models may output raw tool JSON as plain text. Use the native Ollama API URL instead: baseUrl: "http://host:11434" (no /v1).

on https://docs.openclaw.ai/providers/ollama

If I just use one ollama provider it works but I want to be able to select between different providers

Steps to reproduce

.

Expected behavior

.

Actual behavior

.

OpenClaw version

2026.4.9

Operating system

linux

Install method

docker

Model

ollama

Provider / routing chain

openclaw -> ollama

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

  • The most likely fix is to use the native Ollama API URL without the /v1 suffix for the baseUrl in the bernard provider configuration.

Guidance

  • Verify that the baseUrl for the bernard provider is set to http://192.168.1.244:11434/ without any additional path.
  • Ensure that the api field in the bernard provider configuration is set to ollama, as this is the correct API identifier for the Ollama provider.
  • Check the OpenClaw documentation for any specific requirements or recommendations for configuring multiple providers, especially when using the Ollama API.
  • Test the configuration with a single provider first, as mentioned in the issue, to ensure that the basic setup is correct before attempting to use multiple providers.

Example

No code snippet is provided as the issue is related to configuration rather than code.

Notes

The issue seems to be related to the configuration of the Ollama provider in OpenClaw, specifically the use of the incorrect API URL. The provided note from the OpenClaw documentation explicitly warns against using the /v1 OpenAI-compatible URL with OpenClaw.

Recommendation

Apply workaround: Use the native Ollama API URL without the /v1 suffix for the baseUrl in the bernard provider configuration, as this is the recommended setup according to the OpenClaw documentation.

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

.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING