cmd/opencode: rename provider from "Ollama (local)" to "Ollama" (#14566)

The "(local)" qualifier is unnecessary since there's only one Ollama
provider. Existing configs with the old name are migrated automatically;
custom names are left unchanged.
This commit is contained in:
Parth Sareen
2026-03-02 14:17:18 -08:00
committed by GitHub
parent 23d4cad1a2
commit a3093cd5e5
2 changed files with 44 additions and 1 deletions

View File

@@ -122,13 +122,18 @@ func (o *OpenCode) Edit(modelList []string) error {
if !ok {
ollama = map[string]any{
"npm": "@ai-sdk/openai-compatible",
"name": "Ollama (local)",
"name": "Ollama",
"options": map[string]any{
"baseURL": envconfig.Host().String() + "/v1",
},
}
}
// Migrate legacy provider name
if name, _ := ollama["name"].(string); name == "Ollama (local)" {
ollama["name"] = "Ollama"
}
models, ok := ollama["models"].(map[string]any)
if !ok {
models = make(map[string]any)