From 8d8fb5e41c28ea8ada529b5ced34b0a45391dbb0 Mon Sep 17 00:00:00 2001 From: Kevin Liu <90159554+kliu2python@users.noreply.github.com> Date: Tue, 28 Oct 2025 09:24:59 -0700 Subject: [PATCH] Avoid duplicating STF API base path --- backend/node_manager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/node_manager.py b/backend/node_manager.py index 5b53229..58a717b 100644 --- a/backend/node_manager.py +++ b/backend/node_manager.py @@ -350,7 +350,11 @@ def _create_stf_api_client(stf_config: Dict) -> StfApiClient: if not isinstance(api_base, str) or not api_base.strip(): base_candidate = stf_config.get("base_url") or stf_config.get("url") if isinstance(base_candidate, str) and base_candidate.strip(): - api_base = f"{base_candidate.rstrip('/')}/api/v1" + cleaned_base = base_candidate.strip().rstrip("/") + if cleaned_base.endswith("/api/v1"): + api_base = cleaned_base + else: + api_base = f"{cleaned_base}/api/v1" if not isinstance(api_base, str) or not api_base.strip(): raise HTTPException(