diff options
Diffstat (limited to 'internal/hexailsp')
| -rw-r--r-- | internal/hexailsp/run.go | 4 | ||||
| -rw-r--r-- | internal/hexailsp/run_test.go | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/internal/hexailsp/run.go b/internal/hexailsp/run.go index 242a013..25d1929 100644 --- a/internal/hexailsp/run.go +++ b/internal/hexailsp/run.go @@ -54,7 +54,9 @@ 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() + if err := llm.RegisterAllProviders(); err != nil { + return fmt.Errorf("failed to register LLM providers: %w", err) + } return runWithConfigDependencies(logPath, configPath, stdin, stdout, stderr, defaultRunDependencies()) } diff --git a/internal/hexailsp/run_test.go b/internal/hexailsp/run_test.go index fa4d535..b061f17 100644 --- a/internal/hexailsp/run_test.go +++ b/internal/hexailsp/run_test.go @@ -18,7 +18,9 @@ import ( // 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() + if err := llm.RegisterAllProviders(); err != nil { + panic(err) + } os.Exit(m.Run()) } |
