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/llm | |
| 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/llm')
| -rw-r--r-- | internal/llm/ollama.go | 7 | ||||
| -rw-r--r-- | internal/llm/provider.go | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/internal/llm/ollama.go b/internal/llm/ollama.go index 0916c06..987a258 100644 --- a/internal/llm/ollama.go +++ b/internal/llm/ollama.go @@ -66,11 +66,14 @@ func newOllama(baseURL, model string, defaultTemp *float64, apiKey string) Clien } func newOllamaWithTimeout(baseURL, model, apiKey string, defaultTemp *float64, timeoutSec int) Client { + // Defaults target Ollama Cloud (ollama.ai); a local server is opted into + // by setting base_url = "http://localhost:11434" (or HEXAI_OLLAMA_BASE_URL) + // and an appropriate model. if strings.TrimSpace(baseURL) == "" { - baseURL = "http://localhost:11434" + baseURL = "https://ollama.com" } if strings.TrimSpace(model) == "" { - model = "qwen3-coder:30b-a3b-q4_K_M" + model = "kimi-k2.6" } if timeoutSec <= 0 { timeoutSec = 30 diff --git a/internal/llm/provider.go b/internal/llm/provider.go index 255297c..d1ff404 100644 --- a/internal/llm/provider.go +++ b/internal/llm/provider.go @@ -152,7 +152,7 @@ func RegisterAllProviders() { func NewFromConfig(cfg Config, openAIAPIKey, openRouterAPIKey, anthropicAPIKey, ollamaAPIKey string) (Client, error) { provider := normalizeProvider(cfg.Provider) if provider == "" { - provider = "openai" + provider = "ollama" } factory, ok := lookupProviderFactory(provider) |
