diff --git a/ui/litellm-dashboard/src/app/page.tsx b/ui/litellm-dashboard/src/app/page.tsx index b0740e54961..b2a220d6608 100644 --- a/ui/litellm-dashboard/src/app/page.tsx +++ b/ui/litellm-dashboard/src/app/page.tsx @@ -19,6 +19,7 @@ import PassThroughSettings from "@/components/pass_through_settings"; import BudgetPanel from "@/components/budgets/budget_panel"; import SpendLogsTable from "@/components/view_logs"; import ModelHubTable from "@/components/model_hub_table"; +import PublicModelHub from "@/components/public_model_hub"; import NewUsagePage from "@/components/new_usage"; import APIReferenceView from "@/app/(dashboard)/api-reference/APIReferenceView"; import ChatUI from "@/components/chat_ui/ChatUI"; @@ -43,6 +44,7 @@ import useFeatureFlags from "@/hooks/useFeatureFlags"; import SidebarProvider from "@/app/(dashboard)/components/SidebarProvider"; import OldTeams from "@/components/OldTeams"; import { SearchTools } from "@/components/search_tools"; +import { isAdminRole } from "@/utils/roles"; function getCookie(name: string) { // Safer cookie read + decoding; handles '=' inside values @@ -439,12 +441,16 @@ export default function CreateKeyPage() { ) : page == "cost-tracking-settings" ? ( ) : page == "model-hub-table" ? ( - + isAdminRole(userRole) ? ( + + ) : ( + + ) ) : page == "caching" ? ( = ({ accessToken }) => { +const PublicModelHub: React.FC = ({ accessToken, isEmbedded = false }) => { const [modelHubData, setModelHubData] = useState(null); const [agentHubData, setAgentHubData] = useState(null); const [pageTitle, setPageTitle] = useState("LiteLLM Gateway"); @@ -713,35 +714,48 @@ const PublicModelHub: React.FC = ({ accessToken }) => { return ( -
- {/* Navigation */} - +
+ {/* Navigation - only show when not embedded */} + {!isEmbedded && ( + + )} -
- {/* About Section */} - - About -

- {customDocsDescription ? customDocsDescription : "Proxy Server to call 100+ LLMs in the OpenAI format."} -

-
- - 🔧 - Built with litellm: v{litellmVersion} - +
+ {/* Embedded Explainer - only shown when embedded in dashboard */} + {isEmbedded && ( +
+

+ These are models, agents, and MCP servers your proxy admin has indicated are available in your company. +

- + )} - {/* Useful Links */} + {/* About Section - only shown when not embedded */} + {!isEmbedded && ( + + About +

+ {customDocsDescription ? customDocsDescription : "Proxy Server to call 100+ LLMs in the OpenAI format."} +

+
+ + 🔧 + Built with litellm: v{litellmVersion} + +
+
+ )} + + {/* Useful Links - only shown when not embedded */} {usefulLinks && Object.keys(usefulLinks).length > 0 && ( Useful Links @@ -760,13 +774,15 @@ const PublicModelHub: React.FC = ({ accessToken }) => { )} - {/* Health and Endpoint Status */} - - Health and Endpoint Status -
- Service status: {serviceStatus} -
-
+ {/* Health and Endpoint Status - only shown when not embedded */} + {!isEmbedded && ( + + Health and Endpoint Status +
+ Service status: {serviceStatus} +
+
+ )} {/* Tabs for Models and Agents */}