The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
feat(ui): add custom proxy base URL support to Playground
Chesars229d2801413e
diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsxindex f0464c61f88..ed43c8aa455 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.tsxindex a963aa706be..145560e9922 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<ChatUIProps> = ({return disabledPersonalKeyCreation ? "custom" : "session";});const [apiKey, setApiKey] = useState<string>(() => sessionStorage.getItem("apiKey") || "");+ const [customProxyBaseUrl, setCustomProxyBaseUrl] = useState<string>(+ () => sessionStorage.getItem("customProxyBaseUrl") || ""+ );const [inputMessage, setInputMessage] = useState("");const [chatHistory, setChatHistory] = useState<MessageType[]>(() => {try {@@ -1112,6 +1115,26 @@ const ChatUI: React.FC<ChatUIProps> = ({)}</div>+ <div>+ <Text className="font-medium block mb-2 text-gray-700 flex items-center">+ <SettingOutlined className="mr-2" /> Custom Proxy Base URL+ </Text>+ <TextInput+ placeholder="Optional: Enter custom proxy URL (e.g., http://localhost:5000)"+ onValueChange={(value) => {+ setCustomProxyBaseUrl(value);+ sessionStorage.setItem("customProxyBaseUrl", value);+ }}+ value={customProxyBaseUrl}+ icon={ApiOutlined}+ />+ {customProxyBaseUrl && (+ <Text className="text-xs text-gray-500 mt-1">+ API calls will be sent to: {customProxyBaseUrl}+ </Text>+ )}+ </div>+<div><Text className="font-medium block mb-2 text-gray-700 flex items-center"><ApiOutlined className="mr-2" /> Endpoint Type