openclaw - 💡(How to fix) Fix Beta blocker: ollama-provider - plugin appends /v1 to baseUrl in models.json overriding correct config [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#70979Fetched 2026-04-24 10:37:10
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×3renamed ×1

The bundled Ollama provider plugin writes baseUrl: http://host:11434/v1 to models.json regardless of the correct baseUrl: http://host:11434 specified in openclaw.json, silently breaking native Ollama tool calling per the documentation's own warning.

Root Cause

The bundled Ollama provider plugin writes baseUrl: http://host:11434/v1 to models.json regardless of the correct baseUrl: http://host:11434 specified in openclaw.json, silently breaking native Ollama tool calling per the documentation's own warning.

Fix Action

Fix / Workaround

Plugin: @openclaw/ollama-provider v2026.4.22 (stock bundled) Remote Ollama at http://192.168.40.22:11434 openclaw.json models.providers.ollama.api: "ollama" (native, not openai-completions) Workaround: sed -i 's|:11434/v1|:11434|g' ~/.openclaw/agents/main/agent/models.json Workaround is temporary — plugin regenerates /v1 on every gateway restart

RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

Yes

Summary

The bundled Ollama provider plugin writes baseUrl: http://host:11434/v1 to models.json regardless of the correct baseUrl: http://host:11434 specified in openclaw.json, silently breaking native Ollama tool calling per the documentation's own warning.

Steps to reproduce

  1. Configure openclaw.json with remote Ollama: models.providers.ollama.baseUrl: "http://192.168.40.22:11434" models.providers.ollama.api: "ollama"
  2. Start OpenClaw gateway
  3. Inspect ~/.openclaw/agents/main/agent/models.json
  4. Observe /v1 appended to baseUrl by the plugin

Expected behavior

Per docs.openclaw.ai/providers/ollama: "Do not use the /v1 OpenAI-compatible URL 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)." The plugin should write the baseUrl exactly as specified in openclaw.json.

Actual behavior

openclaw.json specifies: "baseUrl": "http://192.168.40.22:11434"

Plugin writes to models.json: "baseUrl": "http://192.168.40.22:11434/v1"

Confirmed via: grep "baseUrl" ~/.openclaw/agents/main/agent/models.json

"baseUrl": "http://192.168.40.22:11434/v1"

openclaw models status --json confirms models.json is the active source: "source": "models.json: ~/.openclaw/agents/main/agent/models.json"

OpenClaw version

2026.4.22

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

Plugin: @openclaw/ollama-provider v2026.4.22 (stock bundled) Remote Ollama at http://192.168.40.22:11434 openclaw.json models.providers.ollama.api: "ollama" (native, not openai-completions) Workaround: sed -i 's|:11434/v1|:11434|g' ~/.openclaw/agents/main/agent/models.json Workaround is temporary — plugin regenerates /v1 on every gateway restart

Logs, screenshots, and evidence

Impact and severity

Affected: All users with remote Ollama using native api: "ollama" mode Severity: High — silently breaks native tool calling for all remote Ollama users Frequency: 100% reproducible — happens on every gateway start Consequence: Tool calls may fail or return raw JSON as plain text; user has no indication this is happening

Additional information

The /v1 path routes through OpenAI-compatible mode instead of native Ollama API. Per docs, this breaks tool calling — models output raw tool JSON as plain text. The plugin owns models.json (marked "plugin-owned") so manual edits are overwritten. Fix must be in the plugin's baseUrl generation logic.

extent analysis

TL;DR

The Ollama provider plugin should be updated to correctly generate the baseUrl without appending "/v1" to match the specification in openclaw.json.

Guidance

  • Verify that the baseUrl in openclaw.json is correctly set to the native Ollama API URL without the "/v1" path.
  • Check the plugin's documentation and source code to see if there's an option to disable the automatic appending of "/v1" to the baseUrl.
  • Consider filing an issue or pull request with the @openclaw/ollama-provider plugin to fix the baseUrl generation logic.
  • As a temporary workaround, use the provided sed command to manually correct the baseUrl in models.json, but be aware that this will need to be reapplied after every gateway restart.

Example

No code snippet is provided as the issue is related to the plugin's internal logic, but the sed command can be used as a temporary workaround:

sed -i 's|:11434/v1|:11434|g' ~/.openclaw/agents/main/agent/models.json

Notes

The provided workaround is temporary and may not be suitable for production environments. A permanent fix should be implemented in the plugin's baseUrl generation logic.

Recommendation

Apply the workaround using the sed command until a fixed version of the @openclaw/ollama-provider plugin is available, as it is a high-severity issue that silently breaks native tool calling for all remote Ollama users.

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: "Do not use the /v1 OpenAI-compatible URL 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)." The plugin should write the baseUrl exactly as specified in openclaw.json.

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 Beta blocker: ollama-provider - plugin appends /v1 to baseUrl in models.json overriding correct config [1 participants]