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/hexaicli | |
| 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/hexaicli')
| -rw-r--r-- | internal/hexaicli/cache_test.go | 3 | ||||
| -rw-r--r-- | internal/hexaicli/run_test.go | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/internal/hexaicli/cache_test.go b/internal/hexaicli/cache_test.go index 5f00e7b..c9b83c6 100644 --- a/internal/hexaicli/cache_test.go +++ b/internal/hexaicli/cache_test.go @@ -75,6 +75,9 @@ func TestRun_UsesCachedResponseWithoutClientCall(t *testing.T) { t.Chdir(t.TempDir()) t.Setenv("XDG_CONFIG_HOME", t.TempDir()) t.Setenv("XDG_CACHE_HOME", t.TempDir()) + // This test asserts an "openai/gpt-4.1" cache-hit label, so pin the provider + // (the in-code default switched to ollama when no config is present). + t.Setenv("HEXAI_PROVIDER", "openai") oldNew := newClientFromApp defer func() { newClientFromApp = oldNew }() diff --git a/internal/hexaicli/run_test.go b/internal/hexaicli/run_test.go index 69e5d98..e2788e5 100644 --- a/internal/hexaicli/run_test.go +++ b/internal/hexaicli/run_test.go @@ -167,6 +167,10 @@ func TestPrintProviderInfo(t *testing.T) { } func TestRun_SingleProviderHeaderUsesStderr(t *testing.T) { + // This test asserts an "openai:gpt-4.1:" header, so pin the provider/model + // explicitly (the in-code default switched to ollama/kimi-k2.6). + t.Setenv("HEXAI_PROVIDER", "openai") + t.Setenv("HEXAI_OPENAI_MODEL", "gpt-4.1") oldNew := newClientFromApp defer func() { newClientFromApp = oldNew }() newClientFromApp = func(_ appconfig.App) (llm.Client, error) { |
