From 0bc706d71c101ca064a5b9e9823fb039509cbe6e Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 4 Mar 2026 03:06:17 +0000 Subject: [PATCH 1/2] Add minimal dev_config.yaml for proxy development Co-authored-by: Ishaan Jaff --- dev_config.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 dev_config.yaml diff --git a/dev_config.yaml b/dev_config.yaml new file mode 100644 index 000000000000..64e3c14703e3 --- /dev/null +++ b/dev_config.yaml @@ -0,0 +1,13 @@ +model_list: + - model_name: fake-openai-endpoint + litellm_params: + model: openai/fake-model + api_key: fake-key + api_base: https://exampleopenaiendpoint-production.up.railway.app/ + +general_settings: + master_key: sk-1234 + +litellm_settings: + drop_params: True + telemetry: False From fe223453d3f018b1556da38a866c470f02151b9e Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 4 Mar 2026 03:46:15 +0000 Subject: [PATCH 2/2] feat(ui): wrap left nav items in tags for open-in-new-tab support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nav items are now rendered as elements with proper href attributes, enabling right-click → 'Open in new tab', Ctrl/Cmd+click, and middle-click to open any sidebar page in a new browser tab. Normal clicks continue to use SPA navigation (no full page reload). Applied to both leftnav.tsx (query-param routing) and Sidebar2.tsx (Next.js file-based routing). Co-authored-by: Ishaan Jaff --- .../app/(dashboard)/components/Sidebar2.tsx | 25 ++++++++++- .../src/components/leftnav.tsx | 44 ++++++++++++++++++- 2 files changed, 65 insertions(+), 4 deletions(-) diff --git a/ui/litellm-dashboard/src/app/(dashboard)/components/Sidebar2.tsx b/ui/litellm-dashboard/src/app/(dashboard)/components/Sidebar2.tsx index a74d3c108d6e..b3829d0a8f4d 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/components/Sidebar2.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/components/Sidebar2.tsx @@ -374,6 +374,27 @@ const Sidebar2: React.FC = ({ accessToken, userRole, defaultSelect router.push(href); }; + // Wrap label in so every nav item supports right-click → "Open in new tab" + // and Ctrl/Cmd+click to open in a new tab, while preserving SPA navigation for normal clicks. + const renderNavLink = (label: string, page: string): React.ReactNode => { + const href = toHref(page); + return ( + { + if (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1) { + e.stopPropagation(); + return; + } + e.preventDefault(); + }} + style={{ color: "inherit", textDecoration: "none" }} + > + {label} + + ); + }; + return ( = ({ accessToken, userRole, defaultSelect items={filteredMenuItems.map((item) => ({ key: item.key, icon: item.icon, - label: item.label, + label: renderNavLink(item.label, item.page), children: item.children?.map((child) => ({ key: child.key, icon: child.icon, - label: child.label, + label: renderNavLink(child.label, child.page), onClick: () => goTo(child.page), })), onClick: !item.children ? () => goTo(item.page) : undefined, diff --git a/ui/litellm-dashboard/src/components/leftnav.tsx b/ui/litellm-dashboard/src/components/leftnav.tsx index e84b6e86e4a3..e09a95d15b70 100644 --- a/ui/litellm-dashboard/src/components/leftnav.tsx +++ b/ui/litellm-dashboard/src/components/leftnav.tsx @@ -374,6 +374,46 @@ const Sidebar: React.FC = ({ setPage, defaultSelectedKey, collapse setPage(page); }; + // Wrap label in so every nav item supports right-click → "Open in new tab" + // and Ctrl/Cmd+click to open in a new tab, while preserving SPA navigation for normal clicks. + const renderNavLink = ( + label: React.ReactNode, + page: string, + externalUrl?: string, + ): React.ReactNode => { + if (externalUrl) { + return ( + e.stopPropagation()} + style={{ color: "inherit", textDecoration: "none" }} + > + {label} + + ); + } + const params = new URLSearchParams(window.location.search); + params.set("page", page); + const href = `?${params.toString()}`; + return ( + { + if (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1) { + e.stopPropagation(); + return; + } + e.preventDefault(); + }} + style={{ color: "inherit", textDecoration: "none" }} + > + {label} + + ); + }; + // Filter items based on user role and enabled pages for internal users const filterItemsByRole = (items: MenuItem[]): MenuItem[] => { const isAdmin = isAdminRole(userRole); @@ -469,11 +509,11 @@ const Sidebar: React.FC = ({ setPage, defaultSelectedKey, collapse children: filteredItems.map((item) => ({ key: item.key, icon: item.icon, - label: item.label, + label: renderNavLink(item.label, item.page, item.external_url), children: item.children?.map((child) => ({ key: child.key, icon: child.icon, - label: child.label, + label: renderNavLink(child.label, child.page, child.external_url), onClick: () => { if (child.external_url) { window.open(child.external_url, "_blank");