Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions internal/llm/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,17 @@ var registry = []Provider{
"kimi-k2.6",
},
},
{
Name: "ollama-cloud",
DisplayName: "Ollama Cloud API",
Protocol: "openai",
BaseURL: "https://ollama.com/v1",
EnvVar: "OLLAMA_API_KEY",
Models: []string{
"gpt-oss:120b",
"gpt-oss:20b",
},
Comment on lines +232 to +237

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential issue: The BaseURL https://ollama.com/v1 does not appear to be a documented or verified Ollama Cloud API endpoint. Ollama is primarily known as a local LLM runtime (default http://localhost:11434), and there is no well-known public cloud API at this URL. Similarly, the model names gpt-oss:120b and gpt-oss:20b do not correspond to any known publicly available models.

Please verify:

  1. Is this BaseURL correct and currently active?
  2. Are these model names accurate for this provider?

If this is a placeholder or speculative entry, consider adding a comment or marking it accordingly to avoid confusion.

},
}

var registryMap map[string]Provider
Expand Down
30 changes: 29 additions & 1 deletion internal/llm/providers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestListProviders_Order(t *testing.T) {
if len(providers) < 3 {
t.Fatalf("expected at least 3 providers, got %d", len(providers))
}
expected := []string{"anthropic", "baidu-qianfan", "dashscope", "dashscope-tokenplan", "deepseek", "hy-tokenplan", "kimi", "mimo", "minimax", "openai", "tencent-tokenhub", "volcengine", "z-ai", "z-ai-coding"}
expected := []string{"anthropic", "baidu-qianfan", "dashscope", "dashscope-tokenplan", "deepseek", "hy-tokenplan", "kimi", "mimo", "minimax", "ollama-cloud", "openai", "tencent-tokenhub", "volcengine", "z-ai", "z-ai-coding"}
if len(providers) != len(expected) {
t.Fatalf("expected %d providers, got %d", len(expected), len(providers))
}
Expand Down Expand Up @@ -126,3 +126,31 @@ func TestLookupProvider_OpenAIDetails(t *testing.T) {
t.Errorf("AuthHeader = %q, want empty", p.AuthHeader)
}
}

func TestLookupProvider_OllamaCloudDetails(t *testing.T) {
p, ok := LookupProvider("ollama-cloud")
if !ok {
t.Fatal("ollama-cloud not found")
}
if p.Protocol != "openai" {
t.Errorf("Protocol = %q, want %q", p.Protocol, "openai")
}
if p.BaseURL != "https://ollama.com/v1" {
t.Errorf("BaseURL = %q, want %q", p.BaseURL, "https://ollama.com/v1")
}
if p.EnvVar != "OLLAMA_API_KEY" {
t.Errorf("EnvVar = %q, want %q", p.EnvVar, "OLLAMA_API_KEY")
}
if p.AuthHeader != "" {
t.Errorf("AuthHeader = %q, want empty", p.AuthHeader)
}
expectedModels := []string{"gpt-oss:120b", "gpt-oss:20b"}
if len(p.Models) != len(expectedModels) {
t.Fatalf("expected %d models, got %d", len(expectedModels), len(p.Models))
}
for i, model := range expectedModels {
if p.Models[i] != model {
t.Errorf("Models[%d] = %q, want %q", i, p.Models[i], model)
}
}
}
Loading