[PR #14393] [CLOSED] cmd/config: fix openclaw api field to use openai-completions #25193

Closed
opened 2026-04-19 18:04:02 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14393
Author: @whaili
Created: 2/24/2026
Status: Closed

Base: mainHead: fix-openclaw-api-field


📝 Commits (1)

  • 501c025 cmd/config: fix openclaw api field to use openai-completions

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 cmd/config/openclaw.go (+1 -1)

📄 Description

What

changed the api field in the generated OpenClaw config
from "openai-completions" to "ollama". OpenClaw does not recognize
"ollama" as a valid API type, causing ollama launch openclaw to
fail on v0.17.0 with:

  Invalid config at /root/.openclaw/openclaw.json:
  - models.providers.ollama.api: Invalid input

Fix

Restore the api field to "openai-completions", which matches the
OpenAI-compatible /v1 endpoint that Ollama exposes.

Steps to reproduce

  1. Install ollama v0.17.0
  2. Run ollama launch openclaw
  3. Observe "Invalid input" error for models.providers.ollama.api

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/14393 **Author:** [@whaili](https://github.com/whaili) **Created:** 2/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-openclaw-api-field` --- ### 📝 Commits (1) - [`501c025`](https://github.com/ollama/ollama/commit/501c025d340f681b9312e9095ccdc59646a6cb4a) cmd/config: fix openclaw api field to use openai-completions ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `cmd/config/openclaw.go` (+1 -1) </details> ### 📄 Description ## What changed the `api` field in the generated OpenClaw config from `"openai-completions"` to `"ollama"`. OpenClaw does not recognize `"ollama"` as a valid API type, causing `ollama launch openclaw` to fail on v0.17.0 with: Invalid config at /root/.openclaw/openclaw.json: - models.providers.ollama.api: Invalid input ## Fix Restore the `api` field to `"openai-completions"`, which matches the OpenAI-compatible `/v1` endpoint that Ollama exposes. ## Steps to reproduce 1. Install ollama v0.17.0 2. Run `ollama launch openclaw` 3. Observe "Invalid input" error for `models.providers.ollama.api` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-19 18:04:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#25193