From 017b355d6632ef9fbf162fa741e7dde366b2b2db Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 26 Apr 2026 09:05:36 +0300 Subject: 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) --- internal/hexailsp/run_test.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'internal/hexailsp') diff --git a/internal/hexailsp/run_test.go b/internal/hexailsp/run_test.go index badb27c..fa4d535 100644 --- a/internal/hexailsp/run_test.go +++ b/internal/hexailsp/run_test.go @@ -38,6 +38,11 @@ func TestRunWithFactory_UsesDefaultsAndCallsServer(t *testing.T) { var stderr bytes.Buffer logger := log.New(&stderr, "hexai-lsp-server ", 0) cfg := appconfig.Load(nil) // defaults + // Pin provider to openai: the in-code default is now ollama, which would + // happily build a client without a key and short-circuit the missing-key + // assertion below. Load(nil) returns raw defaults and ignores env vars, + // so set the field directly on the struct. + cfg.Provider = "openai" var gotOpts lsp.ServerOptions factory := func(r io.Reader, w io.Writer, logger *log.Logger, opts lsp.ServerOptions) ServerRunner { gotOpts = opts @@ -75,7 +80,10 @@ func TestRunWithFactory_BuildsClientWhenKeysPresent(t *testing.T) { var stderr bytes.Buffer logger := log.New(&stderr, "hexai-lsp-server ", 0) - cfg := appconfig.Load(nil) // defaults, provider=openai by default + cfg := appconfig.Load(nil) // defaults + // Pin provider to openai (the in-code default is now ollama). Load(nil) + // returns raw defaults and ignores env vars, so set this on the struct. + cfg.Provider = "openai" var got llm.Client factory := func(r io.Reader, w io.Writer, logger *log.Logger, opts lsp.ServerOptions) ServerRunner { got = opts.Client -- cgit v1.2.3