From 72be87b4e768a0728b1db9479fe72e7b3f912c82 Mon Sep 17 00:00:00 2001 From: Mathias Date: Sun, 24 May 2026 15:06:23 +0200 Subject: [PATCH] chore(routing): flip LITELLM_BASE_URL default to https://llm-api.d-ma.be MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to infra#70. LiteLLM moved off piguard into k3s and the public llm-api.d-ma.be hostname now upstreams to koala:30401. The piguard:4000 default in the source bit-rots — works today because piguard:4000 is still alive during the 7-day soak, breaks the moment the compose comes down. Pointing the default at the public hostname survives the cutover without needing a follow-up. Production deploys via k3s already override via env (in-cluster Service DNS) so this only affects local dev shells without LITELLM_BASE_URL set. - internal/config/routing.go: comment + envOr fallback - internal/config/routing_test.go: expected value in defaults test - scripts/smoke-routing.sh: shell default task check: clean (tests + vet + govulncheck). --- internal/config/routing.go | 4 ++-- internal/config/routing_test.go | 2 +- scripts/smoke-routing.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/config/routing.go b/internal/config/routing.go index adad2f0..ef168d7 100644 --- a/internal/config/routing.go +++ b/internal/config/routing.go @@ -11,7 +11,7 @@ import ( type RoutingConfig struct { Port string // ROUTING_PORT, default 3210 MCPAuthToken string // ROUTING_MCP_TOKEN, optional bearer token - LiteLLMBaseURL string // LITELLM_BASE_URL, default http://piguard:4000 + LiteLLMBaseURL string // LITELLM_BASE_URL, default https://llm-api.d-ma.be LiteLLMAPIKey string // LITELLM_API_KEY BrainURL string // BRAIN_URL, default http://ingestion.supervisor:3300 FastModel string // HYPERGUILD_FAST_MODEL, default koala/qwen35-9b-fast @@ -41,7 +41,7 @@ func LoadRouting() (RoutingConfig, error) { cfg := RoutingConfig{ Port: envOr("ROUTING_PORT", "3210"), MCPAuthToken: os.Getenv("ROUTING_MCP_TOKEN"), - LiteLLMBaseURL: envOr("LITELLM_BASE_URL", "http://piguard:4000"), + LiteLLMBaseURL: envOr("LITELLM_BASE_URL", "https://llm-api.d-ma.be"), LiteLLMAPIKey: os.Getenv("LITELLM_API_KEY"), BrainURL: envOr("BRAIN_URL", "http://ingestion.supervisor:3300"), FastModel: envOr("HYPERGUILD_FAST_MODEL", "koala/qwen35-9b-fast"), diff --git a/internal/config/routing_test.go b/internal/config/routing_test.go index dd14f0d..2ef33ad 100644 --- a/internal/config/routing_test.go +++ b/internal/config/routing_test.go @@ -22,7 +22,7 @@ func TestLoadRoutingDefaults(t *testing.T) { require.NoError(t, err) assert.Equal(t, "3210", cfg.Port) assert.Equal(t, "", cfg.MCPAuthToken) - assert.Equal(t, "http://piguard:4000", cfg.LiteLLMBaseURL) + assert.Equal(t, "https://llm-api.d-ma.be", cfg.LiteLLMBaseURL) assert.Equal(t, "http://ingestion.supervisor:3300", cfg.BrainURL) assert.Equal(t, "koala/qwen35-9b-fast", cfg.FastModel) assert.Equal(t, "iguana/gemma4-26b", cfg.ThinkingModel) diff --git a/scripts/smoke-routing.sh b/scripts/smoke-routing.sh index 694098a..b610f18 100755 --- a/scripts/smoke-routing.sh +++ b/scripts/smoke-routing.sh @@ -4,7 +4,7 @@ set -euo pipefail # Boot the routing binary and exercise its four tools against live deps. # Skipped when LITELLM_BASE_URL or BRAIN_URL is unreachable. -LITELLM_BASE_URL="${LITELLM_BASE_URL:-http://piguard:4000}" +LITELLM_BASE_URL="${LITELLM_BASE_URL:-https://llm-api.d-ma.be}" BRAIN_URL="${BRAIN_URL:-http://koala:30330}" if ! curl -sS --max-time 2 "${LITELLM_BASE_URL}/v1/models" >/dev/null 2>&1; then