cmd: use native Ollama API endpoint for OpenClaw (#14649)

Remove the /v1 suffix from the OpenClaw provider baseUrl so it uses
the native Ollama API instead of the OpenAI-compatible endpoint. The
/v1 endpoint my break tool calling in OpenClaw.
This commit is contained in:
Bruce MacDonald
2026-03-05 13:29:17 -08:00
committed by GitHub
parent 562c76d7cc
commit 15732f0ea7
2 changed files with 2 additions and 2 deletions

View File

@@ -502,7 +502,7 @@ func (c *Openclaw) Edit(models []string) error {
ollama = make(map[string]any)
}
ollama["baseUrl"] = envconfig.Host().String() + "/v1"
ollama["baseUrl"] = envconfig.Host().String()
// needed to register provider
ollama["apiKey"] = "ollama-local"
ollama["api"] = "ollama"

View File

@@ -589,7 +589,7 @@ const testOpenclawFixture = `{
"providers": {
"anthropic": {"apiKey": "xxx"},
"ollama": {
"baseUrl": "http://127.0.0.1:11434/v1",
"baseUrl": "http://127.0.0.1:11434",
"models": [{"id": "old-model", "customField": "preserved"}]
}
}