mirror of
https://github.com/ollama/ollama.git
synced 2026-04-30 17:58:49 -05:00
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:
@@ -502,7 +502,7 @@ func (c *Openclaw) Edit(models []string) error {
|
|||||||
ollama = make(map[string]any)
|
ollama = make(map[string]any)
|
||||||
}
|
}
|
||||||
|
|
||||||
ollama["baseUrl"] = envconfig.Host().String() + "/v1"
|
ollama["baseUrl"] = envconfig.Host().String()
|
||||||
// needed to register provider
|
// needed to register provider
|
||||||
ollama["apiKey"] = "ollama-local"
|
ollama["apiKey"] = "ollama-local"
|
||||||
ollama["api"] = "ollama"
|
ollama["api"] = "ollama"
|
||||||
|
|||||||
@@ -589,7 +589,7 @@ const testOpenclawFixture = `{
|
|||||||
"providers": {
|
"providers": {
|
||||||
"anthropic": {"apiKey": "xxx"},
|
"anthropic": {"apiKey": "xxx"},
|
||||||
"ollama": {
|
"ollama": {
|
||||||
"baseUrl": "http://127.0.0.1:11434/v1",
|
"baseUrl": "http://127.0.0.1:11434",
|
||||||
"models": [{"id": "old-model", "customField": "preserved"}]
|
"models": [{"id": "old-model", "customField": "preserved"}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user