summaryrefslogtreecommitdiff
path: root/internal/api/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/server.go')
-rw-r--r--internal/api/server.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/api/server.go b/internal/api/server.go
index e7756d1..28cfe4a 100644
--- a/internal/api/server.go
+++ b/internal/api/server.go
@@ -12,6 +12,7 @@ import (
"github.com/thepeterstone/claudomator/internal/config"
"github.com/thepeterstone/claudomator/internal/executor"
+ "github.com/thepeterstone/claudomator/internal/llm"
"github.com/thepeterstone/claudomator/internal/notify"
"github.com/thepeterstone/claudomator/internal/storage"
"github.com/thepeterstone/claudomator/internal/task"
@@ -57,6 +58,7 @@ type Server struct {
vapidEmail string
pushStore pushSubscriptionStore
dropsDir string
+ llm *llm.Client
}
// SetAPIToken configures a bearer token that must be supplied to access the API.
@@ -89,6 +91,14 @@ func (s *Server) SetWorkspaceRoot(path string) {
// Pool returns the executor pool, for graceful shutdown by the caller.
func (s *Server) Pool() *executor.Pool { return s.pool }
+// SetLLM wires a local OpenAI-compatible LLM client for use by elaboration
+// (and future internal helpers). When non-nil, elaboration will prefer it
+// over the Claude CLI; on failure it falls back to claude → gemini.
+func (s *Server) SetLLM(c *llm.Client) {
+ s.llm = c
+}
+
+
func NewServer(store *storage.DB, pool *executor.Pool, logger *slog.Logger, claudeBinPath, geminiBinPath string) *Server {
wd, _ := os.Getwd()
s := &Server{