diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-26 09:05:36 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-26 09:05:36 +0300 |
| commit | 017b355d6632ef9fbf162fa741e7dde366b2b2db (patch) | |
| tree | ee23cbde7c06cdff659820565b13be608eed49aa /internal/llmutils | |
| parent | 4e59e25a4304a674a7c970bc371640cf0f73d3fd (diff) | |
feat: default to Ollama Cloud (kimi-k2.6) when no provider configured
Switches the in-code defaults so that hexai talks to Ollama Cloud
(https://ollama.com) with model kimi-k2.6 when no provider is configured,
instead of OpenAI. The example config, README, and configuration guide
all reflect the new recommended setup; previous OpenAI / local-Ollama
options are still documented as alternatives.
Tests that depended on the implicit "openai" default now pin the
provider explicitly so they continue to exercise the OpenAI / gpt-5
code paths they were designed to cover.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'internal/llmutils')
| -rw-r--r-- | internal/llmutils/client.go | 7 | ||||
| -rw-r--r-- | internal/llmutils/client_test.go | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/internal/llmutils/client.go b/internal/llmutils/client.go index ef24571..ccba847 100644 --- a/internal/llmutils/client.go +++ b/internal/llmutils/client.go @@ -8,11 +8,12 @@ import ( "codeberg.org/snonux/hexai/internal/llm" ) -// CanonicalProvider normalizes provider names and defaults to openai. +// CanonicalProvider normalizes provider names and defaults to ollama (Ollama +// Cloud at https://ollama.com when paired with the default base URL). func CanonicalProvider(name string) string { provider := strings.ToLower(strings.TrimSpace(name)) if provider == "" { - return "openai" + return "ollama" } return provider } @@ -29,7 +30,7 @@ func DefaultModelForProvider(cfg appconfig.App, provider string) string { if model := strings.TrimSpace(cfg.OllamaModel); model != "" { return model } - return "qwen3-coder:30b-a3b-q4_K_M" + return "kimi-k2.6" case "anthropic": if model := strings.TrimSpace(cfg.AnthropicModel); model != "" { return model diff --git a/internal/llmutils/client_test.go b/internal/llmutils/client_test.go index c688213..ed91584 100644 --- a/internal/llmutils/client_test.go +++ b/internal/llmutils/client_test.go @@ -37,7 +37,7 @@ func TestCanonicalProvider(t *testing.T) { if got := CanonicalProvider(" OpenRouter "); got != "openrouter" { t.Fatalf("CanonicalProvider(openrouter) = %q", got) } - if got := CanonicalProvider(" "); got != "openai" { + if got := CanonicalProvider(" "); got != "ollama" { t.Fatalf("CanonicalProvider(empty) = %q", got) } } @@ -73,7 +73,7 @@ func TestDefaultModelForProvider_Fallbacks(t *testing.T) { if got := DefaultModelForProvider(cfg, "openrouter"); got != "openrouter/auto" { t.Fatalf("openrouter fallback = %q", got) } - if got := DefaultModelForProvider(cfg, "ollama"); got != "qwen3-coder:30b-a3b-q4_K_M" { + if got := DefaultModelForProvider(cfg, "ollama"); got != "kimi-k2.6" { t.Fatalf("ollama fallback = %q", got) } if got := DefaultModelForProvider(cfg, "anthropic"); got != "claude-3-5-sonnet-20240620" { |
