From 32d93bb0eac450d22901714411774b695c42f4a0 Mon Sep 17 00:00:00 2001 From: Bytechoreographer Date: Thu, 16 Apr 2026 16:58:31 +0800 Subject: [PATCH] revert(ui): remove NEXT_PUBLIC_LITELLM_PROXY_URL and getUiConfig changes from credential fix These networking.tsx changes were only needed for the K8s port-forward dev workflow. They are unrelated to the credential list staleness fix and add unnecessary scope to this PR. Reverting to upstream baseline. Co-Authored-By: Claude Sonnet 4 (1M context) --- ui/litellm-dashboard/src/components/networking.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsx index f5551612100..16f35605877 100644 --- a/ui/litellm-dashboard/src/components/networking.tsx +++ b/ui/litellm-dashboard/src/components/networking.tsx @@ -80,13 +80,10 @@ import NotificationsManager from "./molecules/notifications_manager"; const isLocal = process.env.NODE_ENV === "development"; // In dev, if NEXT_PUBLIC_USE_REWRITES=true the Next.js dev server proxies API calls // to the backend — use relative URLs (null) so rewrites can intercept them. -// NEXT_PUBLIC_LITELLM_PROXY_URL overrides the hardcoded localhost:4000 default, -// which is useful when running the frontend against a port-forwarded K8s backend. const defaultProxyBaseUrl = - process.env.NEXT_PUBLIC_LITELLM_PROXY_URL ?? - (isLocal && process.env.NEXT_PUBLIC_USE_REWRITES !== "true" + isLocal && process.env.NEXT_PUBLIC_USE_REWRITES !== "true" ? "http://localhost:4000" - : null); + : null; const defaultServerRootPath = "/"; export let serverRootPath = defaultServerRootPath; const WORKER_URL_KEY = "litellm_worker_url"; @@ -126,7 +123,10 @@ const updateProxyBaseUrl = (serverRootPath: string, receivedProxyBaseUrl: string return; } const browserLocation = getWindowLocation(); - const resolvedDefaultProxyBaseUrl = defaultProxyBaseUrl ?? browserLocation?.origin ?? null; + const resolvedDefaultProxyBaseUrl = + isLocal && process.env.NEXT_PUBLIC_USE_REWRITES !== "true" + ? "http://localhost:4000" + : browserLocation?.origin ?? null; let initialProxyBaseUrl = receivedProxyBaseUrl || resolvedDefaultProxyBaseUrl; console.log("proxyBaseUrl:", proxyBaseUrl); console.log("serverRootPath:", serverRootPath);