diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsx index f0464c61f8..ed43c8aa45 100644 --- a/ui/litellm-dashboard/src/components/networking.tsx +++ b/ui/litellm-dashboard/src/components/networking.tsx @@ -92,6 +92,12 @@ const updateServerRootPath = (receivedServerRootPath: string) => { }; export const getProxyBaseUrl = (): string => { + // Check for custom proxy base URL from sessionStorage first + const customProxyBaseUrl = sessionStorage.getItem("customProxyBaseUrl"); + if (customProxyBaseUrl && customProxyBaseUrl.trim() !== "") { + return customProxyBaseUrl; + } + if (proxyBaseUrl) { return proxyBaseUrl; } diff --git a/ui/litellm-dashboard/src/components/playground/chat_ui/ChatUI.tsx b/ui/litellm-dashboard/src/components/playground/chat_ui/ChatUI.tsx index a963aa706b..145560e992 100644 --- a/ui/litellm-dashboard/src/components/playground/chat_ui/ChatUI.tsx +++ b/ui/litellm-dashboard/src/components/playground/chat_ui/ChatUI.tsx @@ -118,6 +118,9 @@ const ChatUI: React.FC = ({ return disabledPersonalKeyCreation ? "custom" : "session"; }); const [apiKey, setApiKey] = useState(() => sessionStorage.getItem("apiKey") || ""); + const [customProxyBaseUrl, setCustomProxyBaseUrl] = useState( + () => sessionStorage.getItem("customProxyBaseUrl") || "" + ); const [inputMessage, setInputMessage] = useState(""); const [chatHistory, setChatHistory] = useState(() => { try { @@ -1112,6 +1115,26 @@ const ChatUI: React.FC = ({ )} +
+ + Custom Proxy Base URL + + { + setCustomProxyBaseUrl(value); + sessionStorage.setItem("customProxyBaseUrl", value); + }} + value={customProxyBaseUrl} + icon={ApiOutlined} + /> + {customProxyBaseUrl && ( + + API calls will be sent to: {customProxyBaseUrl} + + )} +
+
Endpoint Type