diff --git a/action/llm/client.go b/action/llm/client.go index 94da4e9..b49e495 100644 --- a/action/llm/client.go +++ b/action/llm/client.go @@ -7,16 +7,25 @@ import ( "fmt" "io" "net/http" + "os" "github.com/rockliang/poimen/workflows/statemachine" ) -const ( +var ( // LocalLLMBaseURL is the base URL for the local LLM API (OpenAI-compatible) - // Points to homelab-frontend gateway - LocalLLMBaseURL = "https://api.riotpiao.com" + // Can be overridden via LOCAL_LLM_BASE_URL env var (for Kubernetes internal service) + LocalLLMBaseURL string ) +func init() { + LocalLLMBaseURL = os.Getenv("LOCAL_LLM_BASE_URL") + if LocalLLMBaseURL == "" { + // Default: external hostname (for local dev) + LocalLLMBaseURL = "https://api.riotpiao.com" + } +} + var ( // SupportedModels maps local model names to verify they exist SupportedModels = map[string]bool{ diff --git a/k8s/git-commit.yaml b/k8s/git-commit.yaml index 3aa372b..a4a4b51 100644 --- a/k8s/git-commit.yaml +++ b/k8s/git-commit.yaml @@ -9,6 +9,6 @@ metadata: app.kubernetes.io/name: poimen app.kubernetes.io/component: orchestrator data: - GIT_COMMIT: "166674d" # Updated automatically by CI/CD + GIT_COMMIT: "74a8f2e8" # Updated automatically by CI/CD GIT_BRANCH: "main" - DEPLOYMENT_DATE: "2026-08-30" + DEPLOYMENT_DATE: "2026-08-31" diff --git a/k8s/orchestrator-job.yaml b/k8s/orchestrator-job.yaml index 442f3ce..2363be6 100644 --- a/k8s/orchestrator-job.yaml +++ b/k8s/orchestrator-job.yaml @@ -52,6 +52,8 @@ spec: secretKeyRef: name: poimen-secrets key: ANTHROPIC_API_KEY + - name: LOCAL_LLM_BASE_URL + value: "http://api-gateway.api:8080" resources: requests: memory: "512Mi" diff --git a/k8s/worker-deployment.yaml b/k8s/worker-deployment.yaml index 740b8cb..73df1f5 100644 --- a/k8s/worker-deployment.yaml +++ b/k8s/worker-deployment.yaml @@ -13,8 +13,8 @@ spec: labels: app: poimen-worker annotations: - git-commit: "166674d" # ✅ Updated on each push, triggers rolling restart - deployment-date: "2026-08-30" + git-commit: "74a8f2e8" # ✅ Updated on each push, triggers rolling restart + deployment-date: "2026-08-31" spec: containers: - name: worker @@ -51,6 +51,8 @@ spec: secretKeyRef: name: poimen-secrets key: ANTHROPIC_API_KEY + - name: LOCAL_LLM_BASE_URL + value: "http://api-gateway.api:8080" resources: requests: memory: "512Mi"