diff --git a/internal/agentenv/agentenv.go b/internal/agentenv/agentenv.go index 6ed34c97c..2cfda982a 100644 --- a/internal/agentenv/agentenv.go +++ b/internal/agentenv/agentenv.go @@ -170,6 +170,7 @@ var Vars = []string{ var NotPaths = map[string]bool{ "PI_PROFILE": true, "OMP_PROFILE": true, "WINDSURF_API_SERVER_URL": true, "ZCODE_CREDENTIAL_SECRET": true, + "AGY_LLM_GATEWAY_URL": true, "PI_CONFIG_DIR": true, "OPENCODE_DB": true, "STEPCODE_CONFIG_DIR": true, "MAGPIE_ZED_BIN": true, "MAGPIE_ZED_PROCESS_NAMES": true, diff --git a/internal/agentenv/agentenv_test.go b/internal/agentenv/agentenv_test.go index 9c41389bb..ff7e6ad7d 100644 --- a/internal/agentenv/agentenv_test.go +++ b/internal/agentenv/agentenv_test.go @@ -65,3 +65,16 @@ func TestVarsAreApart(t *testing.T) { seen[v] = true } } + +// A variable that holds an address is in NotPaths. Every other one is +// taken for a folder, which magpie passes over when it isn't an absolute +// path: AGY_LLM_GATEWAY_URL=http://… had magpie print "ignoring +// AGY_LLM_GATEWAY_URL: not an absolute path" at every start, and +// appdir.Getenv read it as unset. +func TestAddressesAreNotPaths(t *testing.T) { + for _, v := range Vars { + if (strings.HasSuffix(v, "_URL") || strings.HasSuffix(v, "_ADDR")) && !NotPaths[v] { + t.Errorf("%s holds an address, but it isn't in NotPaths", v) + } + } +}