diff options
Diffstat (limited to 'internal/hexailsp')
| -rw-r--r-- | internal/hexailsp/run.go | 1 | ||||
| -rw-r--r-- | internal/hexailsp/run_test.go | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/internal/hexailsp/run.go b/internal/hexailsp/run.go index 57e7476..242a013 100644 --- a/internal/hexailsp/run.go +++ b/internal/hexailsp/run.go @@ -54,6 +54,7 @@ func Run(logPath string, stdin io.Reader, stdout io.Writer, stderr io.Writer) er // RunWithConfig is like Run but accepts an explicit config file path. func RunWithConfig(logPath string, configPath string, stdin io.Reader, stdout io.Writer, stderr io.Writer) error { + llm.RegisterAllProviders() return runWithConfigDependencies(logPath, configPath, stdin, stdout, stderr, defaultRunDependencies()) } diff --git a/internal/hexailsp/run_test.go b/internal/hexailsp/run_test.go index 583c6c8..badb27c 100644 --- a/internal/hexailsp/run_test.go +++ b/internal/hexailsp/run_test.go @@ -15,6 +15,13 @@ import ( "codeberg.org/snonux/hexai/internal/lsp" ) +// TestMain registers all built-in LLM providers before tests run, mirroring +// the explicit registration done in production binaries via RunWithConfig. +func TestMain(m *testing.M) { + llm.RegisterAllProviders() + os.Exit(m.Run()) +} + // fake server capturing options and recording run calls type fakeServer struct { ran bool |
