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
UISSOSettings
Ishaan Jaff2607676e3f89
diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.pyindex b18a1932ade..8b63f5b7f52 100644--- a/litellm/proxy/_types.py+++ b/litellm/proxy/_types.py@@ -2713,22 +2713,7 @@ class UISSOSettings(LiteLLMPydanticObjectBase):Configuration for SSO integration with the LiteLLM proxy UI"""- max_internal_user_budget: Optional[float] = Field(- default=None,- description="Global maximum budget (in USD) for all internal users",- )- internal_user_budget_duration: Optional[str] = Field(- default=None,- description="Global budget duration for internal users (e.g. '30d', '1mo')",- )default_internal_user_params: Optional[DefaultInternalUserParams] = Field(default=None,description="Default parameters applied to new users signing in via SSO",)- upperbound_key_generate_params: Optional[UpperboundKeyGenerateParams] = Field(- default=None,- description="Maximum limits for key generation when self-serve flow is enabled",- )- key_generation_settings: Optional[KeyGenerationSettings] = Field(- default=None, description="Settings that control which users can generate keys"- )diff --git a/ui/litellm-dashboard/src/components/SSOSettings.tsx b/ui/litellm-dashboard/src/components/SSOSettings.tsxindex 8e6b31d3164..d1b29b22425 100644--- a/ui/litellm-dashboard/src/components/SSOSettings.tsx+++ b/ui/litellm-dashboard/src/components/SSOSettings.tsx@@ -58,7 +58,7 @@ const SSOSettings: React.FC<SSOSettingsProps> = ({ accessToken }) => {if (!settings) {return (<Card>- <Title>SSO Settings</Title>+ <Title>Personal Key Creation</Title><Text>No settings available or you don't have permission to view them.</Text></Card>);diff --git a/ui/litellm-dashboard/src/components/admins.tsx b/ui/litellm-dashboard/src/components/admins.tsxindex 059933f6849..cd0f34b7060 100644--- a/ui/litellm-dashboard/src/components/admins.tsx+++ b/ui/litellm-dashboard/src/components/admins.tsx@@ -38,7 +38,6 @@ import OnboardingModal from "./onboarding_link";import { InvitationLink } from "./onboarding_link";import SSOModals from "./SSOModals";import { ssoProviderConfigs } from './SSOModals';-import SSOSettings from "./SSOSettings";interface AdminPanelProps {searchParams: any;@@ -622,12 +621,6 @@ const AdminPanel: React.FC<AdminPanelProps> = ({<b>{nonSssoUrl}</b>{" "}</a></Callout>- {/* Add SSO Settings Component */}- {premiumUser && accessToken && (- <div className="mt-8">- <SSOSettings accessToken={accessToken} />- </div>- )}</Grid></div>);diff --git a/ui/litellm-dashboard/src/components/view_users.tsx b/ui/litellm-dashboard/src/components/view_users.tsxindex d97acbce6d1..6c2db92d1c2 100644--- a/ui/litellm-dashboard/src/components/view_users.tsx+++ b/ui/litellm-dashboard/src/components/view_users.tsx@@ -49,6 +49,7 @@ import { columns } from "./view_users/columns";import { UserDataTable } from "./view_users/table";import { UserInfo } from "./view_users/types";import BulkCreateUsers from "./bulk_create_users_button";+import SSOSettings from "./SSOSettings";interface ViewUserDashboardProps {accessToken: string | null;@@ -106,6 +107,7 @@ const ViewUserDashboard: React.FC<ViewUserDashboardProps> = ({>({});const defaultPageSize = 25;const [searchTerm, setSearchTerm] = useState("");+ const [activeTab, setActiveTab] = useState("users");// check if window is not undefinedif (typeof window !== "undefined") {@@ -285,56 +287,71 @@ const ViewUserDashboard: React.FC<ViewUserDashboardProps> = ({</div></div>- <div className="bg-white rounded-lg shadow">- <div className="border-b px-6 py-4">- <div className="flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0">- <div className="flex items-center space-x-4">- <span className="text-sm text-gray-700">- Showing{" "}- {userListResponse && userListResponse.users && userListResponse.users.length > 0- ? (userListResponse.page - 1) * userListResponse.page_size + 1- : 0}{" "}- -{" "}- {userListResponse && userListResponse.users- ? Math.min(- userListResponse.page * userListResponse.page_size,- userListResponse.total- )- : 0}{" "}- of {userListResponse ? userListResponse.total : 0} results- </span>- <div className="flex items-center space-x-2">- <button- onClick={() => setCurrentPage((p) => Math.max(1, p - 1))}- disabled={!userListResponse || currentPage <= 1}- className="px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"- >- Previous- </button>- <span className="text-sm text-gray-700">- Page {userListResponse ? userListResponse.page : "-"} of{" "}- {userListResponse ? userListResponse.total_pages : "-"}- </span>- <button- onClick={() => setCurrentPage((p) => p + 1)}- disabled={- !userListResponse ||- currentPage >= userListResponse.total_pages- }- className="px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"- >- Next- </button>+ <TabGroup defaultIndex={0} onIndexChange={(index) => setActiveTab(index === 0 ? "users" : "settings")}>+ <TabList className="mb-4">+ <Tab>Users</Tab>+ <Tab>Personal Key Settings</Tab>+ </TabList>++ <TabPanels>+ <TabPanel>+ <div className="bg-white rounded-lg shadow">+ <div className="border-b px-6 py-4">+ <div className="flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0">+ <div className="flex items-center space-x-4">+ <span className="text-sm text-gray-700">+ Showing{" "}+ {userListResponse && userListResponse.users && userListResponse.users.length > 0+ ? (userListResponse.page - 1) * userListResponse.page_size + 1+ : 0}{" "}+ -{" "}+ {userListResponse && userListResponse.users+ ? Math.min(+ userListResponse.page * userListResponse.page_size,+ userListResponse.total+ )+ : 0}{" "}+ of {userListResponse ? userListResponse.total : 0} results+ </span>+ <div className="flex items-center space-x-2">+ <button+ onClick={() => setCurrentPage((p) => Math.max(1, p - 1))}+ disabled={!userListResponse || currentPage <= 1}+ className="px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"+ >+ Previous+ </button>+ <span className="text-sm text-gray-700">+ Page {userListResponse ? userListResponse.page : "-"} of{" "}+ {userListResponse ? userListResponse.total_pages : "-"}+ </span>+ <button+ onClick={() => setCurrentPage((p) => p + 1)}+ disabled={+ !userListResponse ||+ currentPage >= userListResponse.total_pages+ }+ className="px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"+ >+ Next+ </button>+ </div>+ </div>+ </div></div>+ <UserDataTable+ data={userData || []}+ columns={tableColumns}+ isLoading={!userData}+ /></div>- </div>- </div>- <UserDataTable- data={userData || []}- columns={tableColumns}- isLoading={!userData}- />- </div>+ </TabPanel>++ <TabPanel>+ <SSOSettings accessToken={accessToken} />+ </TabPanel>+ </TabPanels>+ </TabGroup>{/* Existing Modals */}<EditUserModal