diff --git a/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/ModelsAndEndpointsView.tsx b/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/ModelsAndEndpointsView.tsx index 42346567273..96a6ffab388 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/ModelsAndEndpointsView.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/ModelsAndEndpointsView.tsx @@ -19,8 +19,12 @@ import { transformModelData } from "./utils/modelDataTransformer"; import { all_admin_roles, internalUserRoles, isProxyAdminRole, isUserTeamAdminForAnyTeam } from "@/utils/roles"; import { RefreshCcw } from "lucide-react"; import { useQueryClient } from "@tanstack/react-query"; -// eslint-disable-next-line litellm-ui/no-banned-ui-imports -import { Tab, TabGroup, TabList, TabPanel, TabPanels } from "@tremor/react"; +import { + Tabs, + TabsContent, + TabsList, + TabsTrigger, +} from "@/components/ui/tabs"; import { useForm } from "react-hook-form"; import { PlusCircle as PlusCircleOutlined } from "lucide-react"; import React, { useEffect, useMemo, useState } from "react"; @@ -69,7 +73,7 @@ const ModelsAndEndpointsView: React.FC = ({ premiumUser, te const [showAdvancedSettings, setShowAdvancedSettings] = useState(false); const [selectedModelId, setSelectedModelId] = useState(null); const [selectedTeamId, setSelectedTeamId] = useState(null); - const [selectedTabIndex, setSelectedTabIndex] = useState(0); + const [selectedTab, setSelectedTab] = useState("all-models"); const [showMissingProviderBanner, setShowMissingProviderBanner] = useState(() => { if (typeof window !== "undefined") { return localStorage.getItem("hideMissingProviderBanner") !== "true"; @@ -365,17 +369,39 @@ const ModelsAndEndpointsView: React.FC = ({ premiumUser, te modelAccessGroups={availableModelAccessGroups} /> ) : ( - - + +
- {all_admin_roles.includes(userRole) ? All Models : Your Models} - {!shouldHideAddModelTab && Add Model} - {all_admin_roles.includes(userRole) && LLM Credentials} - {all_admin_roles.includes(userRole) && Pass-Through Endpoints} - {all_admin_roles.includes(userRole) && Health Status} - {all_admin_roles.includes(userRole) && Model Retry Settings} - {all_admin_roles.includes(userRole) && Model Group Alias} - {all_admin_roles.includes(userRole) && Price Data Reload} + {all_admin_roles.includes(userRole) ? ( + All Models + ) : ( + Your Models + )} + {!shouldHideAddModelTab && ( + Add Model + )} + {all_admin_roles.includes(userRole) && ( + LLM Credentials + )} + {all_admin_roles.includes(userRole) && ( + Pass-Through Endpoints + )} + {all_admin_roles.includes(userRole) && ( + Health Status + )} + {all_admin_roles.includes(userRole) && ( + Model Retry Settings + )} + {all_admin_roles.includes(userRole) && ( + Model Group Alias + )} + {all_admin_roles.includes(userRole) && ( + Price Data Reload + )}
@@ -393,8 +419,8 @@ const ModelsAndEndpointsView: React.FC = ({ premiumUser, te
-
- + + = ({ premiumUser, te setSelectedModelId={setSelectedModelId} setSelectedTeamId={setSelectedTeamId} /> - {!shouldHideAddModelTab && ( - - - - )} - - - - - + {!shouldHideAddModelTab && ( + + - - - - + + )} + + + + + + + + + + = ({ premiumUser, te setModelGroupRetryPolicy={setModelGroupRetryPolicy} handleSaveRetrySettings={handleSaveRetrySettings} /> - - - + + + + + - -
+ + )} diff --git a/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/AllModelsTab.tsx b/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/AllModelsTab.tsx index 6191c2b3030..df0f133515a 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/AllModelsTab.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/AllModelsTab.tsx @@ -11,8 +11,6 @@ import { modelDeleteCall } from "@/components/networking"; import { Info, Settings, Filter, RefreshCw, Search } from "lucide-react"; import { PaginationState, SortingState } from "@tanstack/react-table"; import { useQueryClient } from "@tanstack/react-query"; -// eslint-disable-next-line litellm-ui/no-banned-ui-imports -import { TabPanel } from "@tremor/react"; import { Button } from "@/components/ui/button"; import { Select, @@ -239,7 +237,7 @@ const AllModelsTab = ({ }; return ( - + <>
@@ -563,7 +561,7 @@ const AllModelsTab = ({ onCancel={() => setIsModelSettingsModalVisible(false)} onSuccess={() => setIsModelSettingsModalVisible(false)} /> - + ); }; diff --git a/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/ModelRetrySettingsTab.tsx b/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/ModelRetrySettingsTab.tsx index dfd56a21ff7..43850b21dfc 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/ModelRetrySettingsTab.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/ModelRetrySettingsTab.tsx @@ -7,8 +7,6 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; -// eslint-disable-next-line litellm-ui/no-banned-ui-imports -import { TabPanel } from "@tremor/react"; import React from "react"; interface GlobalRetryPolicyObject { @@ -56,7 +54,7 @@ const ModelRetrySettingsTab = ({ handleSaveRetrySettings, }: ModelRetrySettingsTabProps) => { return ( - + <>
Retry Policy Scope: @@ -184,7 +182,7 @@ const ModelRetrySettingsTab = ({ - + ); }; diff --git a/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/PriceDataManagementTab.tsx b/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/PriceDataManagementTab.tsx index c3c4a5dd7e7..2388ae10cd0 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/PriceDataManagementTab.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/PriceDataManagementTab.tsx @@ -1,5 +1,3 @@ -// eslint-disable-next-line litellm-ui/no-banned-ui-imports -import { TabPanel } from "@tremor/react"; import PriceDataReload from "@/components/price_data_reload"; import React from "react"; import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized"; @@ -10,7 +8,7 @@ const PriceDataManagementTab = () => { const { refetch: refetchModelCostMap } = useModelCostMap(); return ( - + <>

@@ -31,7 +29,7 @@ const PriceDataManagementTab = () => { className="w-full" />

- + ); };