Replace Anthropic client with OpenAI-compatible client targeting https://api.riotpiao.com. Configure models: reasoning (Planner/Judge), ornith:35b (Implementer). Add health check on startup. Add Pi provider support for skill preparation (--pi-provider=local-llm). Files changed: - action/llm/client.go: OpenAI-compatible HTTP client + HealthCheck() - action/llm/client_test.go: Unit tests for model validation & health - cmd/starter/main.go: Health check before workflow, local model defaults - statemachine/types.go: PiProvider field for OrchestratorInput Models: - Planner: reasoning (smart decisions) - Judge: reasoning (quality review) - Implementer: ornith:35b (cheap execution) Skills: pi clone-or-fetch --provider=local-llm with 504 timeout learning. Verification: go build ./cmd/starter ./cmd/worker ./action/llm ✓ Tests: go test -v ./action/llm ✓ (all passing)
This commit is contained in:
+17
-3
@@ -9,6 +9,7 @@ import (
|
||||
"time"
|
||||
|
||||
"go.temporal.io/sdk/client"
|
||||
"github.com/rockliang/poimen/workflows/action/llm"
|
||||
"github.com/rockliang/poimen/workflows/internal/config"
|
||||
"github.com/rockliang/poimen/workflows/internal/health"
|
||||
"github.com/rockliang/poimen/workflows/internal/logging"
|
||||
@@ -21,9 +22,10 @@ func main() {
|
||||
remoteURL = flag.String("remote", "", "remote URL")
|
||||
milestone = flag.String("milestone", "T0", "milestone ID")
|
||||
dryRun = flag.Bool("dry-run", false, "disable git push/merge")
|
||||
plannerModel = flag.String("planner-model", "ornith", "planner model ID")
|
||||
judgeModel = flag.String("judge-model", "ornith", "judge model ID")
|
||||
implementerModel = flag.String("implementer-model", "claude-sonnet-5", "implementer model ID")
|
||||
plannerModel = flag.String("planner-model", "reasoning", "planner model ID (local-llm)")
|
||||
judgeModel = flag.String("judge-model", "reasoning", "judge model ID (local-llm)")
|
||||
implementerModel = flag.String("implementer-model", "ornith:35b", "implementer model ID (local-llm ornith)")
|
||||
piProvider = flag.String("pi-provider", "local-llm", "pi provider name for skills (local-llm)")
|
||||
healthCheck = flag.Bool("health", false, "check health and exit")
|
||||
)
|
||||
flag.Parse()
|
||||
@@ -78,6 +80,7 @@ func main() {
|
||||
Milestone: *milestone,
|
||||
DryRun: *dryRun,
|
||||
MaxCyclesBeforeCAN: 100,
|
||||
PiProvider: *piProvider,
|
||||
Config: statemachine.OrchestratorConfig{
|
||||
SystemPrompt: "You are an expert software developer orchestrating multi-agent work.",
|
||||
Skills: []statemachine.SkillRef{},
|
||||
@@ -109,6 +112,17 @@ func main() {
|
||||
},
|
||||
}
|
||||
|
||||
// Health check: verify local LLM API is reachable
|
||||
logging.Info("checking local LLM API connectivity", logging.String("url", "https://api.riotpiao.com"))
|
||||
llmClient, err := llm.NewClient()
|
||||
if err != nil {
|
||||
logging.Fatal("failed to create LLM client", logging.Err(err))
|
||||
}
|
||||
if err := llmClient.HealthCheck(context.Background()); err != nil {
|
||||
logging.Fatal("local LLM API health check failed", logging.Err(err), logging.String("hint", "ensure homelab-frontend gateway is running and accessible"))
|
||||
}
|
||||
logging.Info("local LLM API is reachable", logging.String("planner-model", *plannerModel), logging.String("judge-model", *judgeModel), logging.String("implementer-model", *implementerModel))
|
||||
|
||||
// Start workflow
|
||||
workflowID := "orch-" + strings.ReplaceAll(*repoPath, "/", "-")
|
||||
logging.Info("starting orchestrator workflow", logging.String("workflowID", workflowID), logging.String("repo", *repoPath))
|
||||
|
||||
Reference in New Issue
Block a user