From 61483d8f04cfd667a3c2b5d6f826715cfc2dda53 Mon Sep 17 00:00:00 2001 From: ishaan-j-berri Date: Sun, 15 Nov 2026 10:23:35 +0800 Subject: [PATCH] fix(ui): rename Customer Portal to Customer Management (#51891) * fix(ui): rename Customer Portal to Customer Management Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com> * fix(ui): polish Customer Management product copy Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com> * style(ui): format Customer Management test assertions Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com> --- litellm/proxy/auth/customer_hierarchy_auth.py | 4 ++-- .../management_endpoints/management_v1/customers.py | 11 ++++++----- .../CreateCustomerDialog.integration.test.tsx | 4 ++-- .../CreateCustomerHierarchyDialog.test.tsx | 6 ++++-- .../CustomerHierarchySettings.integration.test.tsx | 2 +- .../customers/limits.integration.test.tsx | 4 ++-- .../Navbar/ViewSwitcher.integration.test.tsx | 8 ++++---- .../src/components/leftnav.test.tsx | 11 +++++++---- .../ui/litellm-dashboard/src/components/leftnav.tsx | 6 +++--- .../ui/litellm-dashboard/src/i18n/locales/en.json | 12 ++++++------ .../ui/litellm-dashboard/src/lib/http/schema.d.ts | 4 ++-- .../management_v1/test_customers.py | 10 +++++----- 12 files changed, 44 insertions(+), 38 deletions(-) diff --git a/litellm/proxy/auth/customer_hierarchy_auth.py b/litellm/proxy/auth/customer_hierarchy_auth.py index 11b6ae2c488..24dd06e64d4 100644 --- a/litellm/proxy/auth/customer_hierarchy_auth.py +++ b/litellm/proxy/auth/customer_hierarchy_auth.py @@ -553,7 +553,7 @@ async def _register_organization( if isinstance(registered, Failure): if registered.code is ErrorCode.FREE_TIER_LIMIT: verbose_proxy_logger.warning( - "CUSTOMER TRACKING OFF for organization %s because the free customer portal limit was reached. " + "CUSTOMER TRACKING OFF for organization %s because the Customer Management free tier limit was reached. " "Upgrade to Enterprise to remove the limits: https://www.litellm.ai/enterprise", customer_org_alias, ) @@ -620,7 +620,7 @@ async def _register_member( if isinstance(registered, Failure): if registered.code is ErrorCode.FREE_TIER_LIMIT: verbose_proxy_logger.warning( - "CUSTOMER TRACKING OFF for member %s because the free customer portal limit was reached. " + "CUSTOMER TRACKING OFF for member %s because the Customer Management free tier limit was reached. " "Upgrade to Enterprise to remove the limits: https://www.litellm.ai/enterprise", customer_member_id, ) diff --git a/litellm/proxy/management_endpoints/management_v1/customers.py b/litellm/proxy/management_endpoints/management_v1/customers.py index a678a535385..f451344f8cc 100644 --- a/litellm/proxy/management_endpoints/management_v1/customers.py +++ b/litellm/proxy/management_endpoints/management_v1/customers.py @@ -54,13 +54,13 @@ _ERROR_DETAILS: Final[Mapping[ErrorCode, tuple[int, str, str]]] = MappingProxyTy { ErrorCode.CAPACITY_BUSY: ( 503, - "Customer portal busy", - "Customer portal capacity is being updated. Retry the request.", + "Customer Management busy", + "Customer Management capacity is being updated. Retry the request.", ), ErrorCode.FREE_TIER_LIMIT: ( 403, - "Free customer portal limit reached", - "Free customer portal limit reached: up to 5 customer organizations, 5 teams per organization and " + "Customer Management free tier limit reached", + "Customer Management free tier limit reached: up to 5 customer organizations, 5 teams per organization and " "5 members per team without a LiteLLM Enterprise license. Upgrade to Enterprise to remove the limits: " "https://www.litellm.ai/enterprise", ), @@ -213,7 +213,8 @@ AuthCache: TypeAlias = Annotated[UserApiKeyCache, Depends(get_user_api_key_cache @router.get( "/customer_portal/limits", response_model=CustomerPortalLimits, - description="Get customer portal free-tier limits and current capacity. Proxy admins only.", + summary="Get Customer Management Limits", + description="Get Customer Management free-tier limits and current capacity. Proxy admins only.", ) @management_endpoint_wrapper async def get_customer_portal_limits( diff --git a/litellm/ui/litellm-dashboard/src/app/(dashboard)/customers/_components/CreateCustomerDialog.integration.test.tsx b/litellm/ui/litellm-dashboard/src/app/(dashboard)/customers/_components/CreateCustomerDialog.integration.test.tsx index ebc3ede926f..b8426673b83 100644 --- a/litellm/ui/litellm-dashboard/src/app/(dashboard)/customers/_components/CreateCustomerDialog.integration.test.tsx +++ b/litellm/ui/litellm-dashboard/src/app/(dashboard)/customers/_components/CreateCustomerDialog.integration.test.tsx @@ -40,7 +40,7 @@ beforeEach(() => { creations.push(await request.json()); if (freeTierReached) return Response.json( - { detail: "Free customer portal limit reached. Upgrade to Enterprise." }, + { detail: "Customer Management free tier limit reached. Upgrade to Enterprise." }, { status: 403 }, ); return rejectCreation @@ -65,7 +65,7 @@ describe("CreateCustomerDialog", () => { fireEvent.click(screen.getByRole("button", { name: "Create customer" })); await waitFor(() => expect(toast.error).toHaveBeenCalledWith( - expect.stringContaining("Free customer portal limit reached. Upgrade to Enterprise."), + expect.stringContaining("Customer Management free tier limit reached. Upgrade to Enterprise."), ), ); }); diff --git a/litellm/ui/litellm-dashboard/src/app/(dashboard)/customers/_components/CreateCustomerHierarchyDialog.test.tsx b/litellm/ui/litellm-dashboard/src/app/(dashboard)/customers/_components/CreateCustomerHierarchyDialog.test.tsx index 5db40e0ce5a..c08b6bc7359 100644 --- a/litellm/ui/litellm-dashboard/src/app/(dashboard)/customers/_components/CreateCustomerHierarchyDialog.test.tsx +++ b/litellm/ui/litellm-dashboard/src/app/(dashboard)/customers/_components/CreateCustomerHierarchyDialog.test.tsx @@ -164,7 +164,9 @@ describe("CreateCustomerHierarchyDialog", () => { }); it.each(["team", "member"] as const)("surfaces the free-tier 403 detail when creating a %s", async (kind) => { - fetchMock.mockResolvedValue(json({ detail: "Free customer portal limit reached. Upgrade to Enterprise." }, 403)); + fetchMock.mockResolvedValue( + json({ detail: "Customer Management free tier limit reached. Upgrade to Enterprise." }, 403), + ); render( { fireEvent.change(screen.getByRole("textbox", { name: "Display name" }), { target: { value: "Example" } }); fireEvent.click(screen.getByRole("button", { name: "Create" })); expect(await screen.findByRole("alert")).toHaveTextContent( - "Free customer portal limit reached. Upgrade to Enterprise.", + "Customer Management free tier limit reached. Upgrade to Enterprise.", ); expect(onOpenChange).not.toHaveBeenCalled(); expect(onCreated).not.toHaveBeenCalled(); diff --git a/litellm/ui/litellm-dashboard/src/app/(dashboard)/customers/_components/CustomerHierarchySettings.integration.test.tsx b/litellm/ui/litellm-dashboard/src/app/(dashboard)/customers/_components/CustomerHierarchySettings.integration.test.tsx index 555b32f3450..48c8787d2f2 100644 --- a/litellm/ui/litellm-dashboard/src/app/(dashboard)/customers/_components/CustomerHierarchySettings.integration.test.tsx +++ b/litellm/ui/litellm-dashboard/src/app/(dashboard)/customers/_components/CustomerHierarchySettings.integration.test.tsx @@ -385,7 +385,7 @@ describe("CustomerHierarchySettings", () => { /> , ); - expect(await screen.findByRole("alert")).toHaveTextContent("Free customer portal limit reached"); + expect(await screen.findByRole("alert")).toHaveTextContent("Customer Management free tier limit reached"); fireEvent.click(screen.getByRole("button", { name: "Delete customer member" })); const dialog = await screen.findByRole("dialog", { name: "Delete customer member" }); fireEvent.change(within(dialog).getByPlaceholderText("member-1"), { target: { value: "member-1" } }); diff --git a/litellm/ui/litellm-dashboard/src/app/(dashboard)/customers/limits.integration.test.tsx b/litellm/ui/litellm-dashboard/src/app/(dashboard)/customers/limits.integration.test.tsx index 7b8f6cdf7ce..fc79778727a 100644 --- a/litellm/ui/litellm-dashboard/src/app/(dashboard)/customers/limits.integration.test.tsx +++ b/litellm/ui/litellm-dashboard/src/app/(dashboard)/customers/limits.integration.test.tsx @@ -8,7 +8,7 @@ afterEach(() => { vi.unstubAllGlobals(); }); -describe("Customer portal limits", () => { +describe("Customer Management limits", () => { it.each([ { limitsApply: true, reached: false }, { limitsApply: true, reached: true }, @@ -50,7 +50,7 @@ describe("Customer portal limits", () => { expect(screen.queryByText(/Free tier:/)).not.toBeInTheDocument(); } if (limitsApply && reached) { - expect(await screen.findByRole("alert")).toHaveTextContent("Free customer portal limit reached"); + expect(await screen.findByRole("alert")).toHaveTextContent("Customer Management free tier limit reached"); expect(screen.getByRole("alert")).toHaveTextContent( "Requests from new customers or members still go through but are not tracked", ); diff --git a/litellm/ui/litellm-dashboard/src/components/Navbar/ViewSwitcher.integration.test.tsx b/litellm/ui/litellm-dashboard/src/components/Navbar/ViewSwitcher.integration.test.tsx index a0f6e59d029..65f2f977267 100644 --- a/litellm/ui/litellm-dashboard/src/components/Navbar/ViewSwitcher.integration.test.tsx +++ b/litellm/ui/litellm-dashboard/src/components/Navbar/ViewSwitcher.integration.test.tsx @@ -106,23 +106,23 @@ describe("ViewSwitcher", () => { expect(assignSpy).not.toHaveBeenCalled(); }); - it("should open the Customer Portal at the customers page and come back to the gateway", async () => { + it("should open Customer Management at the customers page and come back to the gateway", async () => { const user = userEvent.setup(); renderSwitcher(); await user.click(screen.getByRole("button", { name: "Switch workspace, current: AI Gateway" })); - await user.click(await screen.findByRole("menuitem", { name: /Customer Portal/ })); + await user.click(await screen.findByRole("menuitem", { name: /Customer Management/ })); expect(pushMock).toHaveBeenCalledWith("/ui/customers"); expect(assignSpy).not.toHaveBeenCalled(); expect(localStorage.getItem("litellm_plugin_mode")).toBeNull(); }); - it("should route back to the gateway from Customer Portal mode instead of only flipping the mode", async () => { + it("should route back to the gateway from Customer Management mode instead of only flipping the mode", async () => { localStorage.setItem("litellm_plugin_mode", "customer-portal"); const user = userEvent.setup(); renderSwitcher(); - await user.click(await screen.findByRole("button", { name: "Switch workspace, current: Customer Portal" })); + await user.click(await screen.findByRole("button", { name: "Switch workspace, current: Customer Management" })); await user.click(await screen.findByRole("menuitem", { name: /^AI Gateway/ })); expect(pushMock).toHaveBeenCalledWith("/ui/api-keys"); }); diff --git a/litellm/ui/litellm-dashboard/src/components/leftnav.test.tsx b/litellm/ui/litellm-dashboard/src/components/leftnav.test.tsx index 416671dac1f..19cbcf27d87 100644 --- a/litellm/ui/litellm-dashboard/src/components/leftnav.test.tsx +++ b/litellm/ui/litellm-dashboard/src/components/leftnav.test.tsx @@ -178,7 +178,7 @@ describe("Sidebar (leftnav)", () => { expect(screen.getByRole("link", { name: /litellm home/i })).toHaveAttribute("href", "/ui"); }); - it("should make customer organizations reachable from the Customer Portal sidebar", () => { + it("should make customer organizations reachable from the Customer Management sidebar", () => { localStorage.setItem("litellm_plugin_mode", "customer-portal"); navState.pathname = "/ui/customers/manage"; renderWithProviders( @@ -765,14 +765,17 @@ describe("Sidebar (leftnav)", () => { describe("getBreadcrumb", () => { it("should identify the customer organizations list and its hierarchy routes", () => { expect(getBreadcrumb("/ui/customers/usage")).toEqual({ - section: "Customer Portal", + section: "Customer Management", title: "Customer organizations", }); expect(getBreadcrumb("/ui/customers/manage")).toEqual({ - section: "Customer Portal", + section: "Customer Management", + title: "Customer organizations", + }); + expect(getBreadcrumb("/ui/customers/")).toEqual({ + section: "Customer Management", title: "Customer organizations", }); - expect(getBreadcrumb("/ui/customers/")).toEqual({ section: "Customer Portal", title: "Customer organizations" }); }); it("resolves a top-level route to its section + title", () => { expect(getBreadcrumb("/ui/api-keys")).toEqual({ section: "AI Gateway", title: "Virtual Keys" }); diff --git a/litellm/ui/litellm-dashboard/src/components/leftnav.tsx b/litellm/ui/litellm-dashboard/src/components/leftnav.tsx index 897eda4263e..1bd9a472d28 100644 --- a/litellm/ui/litellm-dashboard/src/components/leftnav.tsx +++ b/litellm/ui/litellm-dashboard/src/components/leftnav.tsx @@ -198,7 +198,7 @@ export const visibleMenuGroups = (groups: readonly MenuGroup[], context: MenuVis // icons changed to lucide as part of the sidebar redesign. const customerPortalGroups: MenuGroup[] = [ { - groupLabel: "CUSTOMER PORTAL", + groupLabel: "CUSTOMER MANAGEMENT", items: [ { key: "customers", @@ -531,7 +531,7 @@ const findMenuItemKey = (route: string): string => { const GROUP_LABELS: Record = { "AI GATEWAY": "shell.nav.groups.aiGateway", - "CUSTOMER PORTAL": "shell.nav.groups.customerPortal", + "CUSTOMER MANAGEMENT": "shell.nav.groups.customerPortal", OBSERVABILITY: "shell.nav.groups.observability", "ACCESS CONTROL": "shell.nav.groups.accessControl", "DEVELOPER TOOLS": "shell.nav.groups.developerTools", @@ -543,7 +543,7 @@ export const groupText = (groupLabel: string): string => const SECTION_DISPLAY: Record = { "AI GATEWAY": "shell.nav.sections.aiGateway", - "CUSTOMER PORTAL": "shell.nav.sections.customerPortal", + "CUSTOMER MANAGEMENT": "shell.nav.sections.customerPortal", OBSERVABILITY: "shell.nav.sections.observability", "ACCESS CONTROL": "shell.nav.sections.accessControl", "DEVELOPER TOOLS": "shell.nav.sections.developerTools", diff --git a/litellm/ui/litellm-dashboard/src/i18n/locales/en.json b/litellm/ui/litellm-dashboard/src/i18n/locales/en.json index 5f9d04881e8..e8c979032ac 100644 --- a/litellm/ui/litellm-dashboard/src/i18n/locales/en.json +++ b/litellm/ui/litellm-dashboard/src/i18n/locales/en.json @@ -8164,7 +8164,7 @@ "accessControl": "ACCESS CONTROL", "developerTools": "DEVELOPER TOOLS", "settings": "SETTINGS", - "customerPortal": "CUSTOMER PORTAL" + "customerPortal": "CUSTOMER MANAGEMENT" }, "sections": { "aiGateway": "AI Gateway", @@ -8172,7 +8172,7 @@ "accessControl": "Access Control", "developerTools": "Developer Tools", "settings": "Settings", - "customerPortal": "Customer Portal" + "customerPortal": "Customer Management" }, "items": { "home": "Home", @@ -20672,15 +20672,15 @@ }, "limits": { "byline": "Free tier: up to 5 customers, 5 teams per customer, 5 members per team. LiteLLM Enterprise removes these limits.", - "reachedTitle": "Free customer portal limit reached", - "reachedDescription": "New customers, teams and members can't be created. Requests from new customers or members still go through but are not tracked in the customer portal.", + "reachedTitle": "Customer Management free tier limit reached", + "reachedDescription": "New customers, teams and members can't be created. Requests from new customers or members still go through but are not tracked in Customer Management.", "upgrade": "Upgrade to Enterprise" }, "hierarchy": { "customerNavigation": "Customer navigation", "usage": "Usage", "manage": "Manage", - "title": "Customer management", + "title": "Customer Management", "subtitle": "Manage customer teams, customer members, and settings for this customer organization.", "teamSubtitle": "Manage customer members and settings for this customer team.", "memberSubtitle": "Manage settings and budget for this customer member.", @@ -20778,7 +20778,7 @@ "deleteInformationTitle": "{{kind}} details" }, "switcher": { - "label": "Customer Portal", + "label": "Customer Management", "description": "Customer organizations and usage" }, "status": { diff --git a/litellm/ui/litellm-dashboard/src/lib/http/schema.d.ts b/litellm/ui/litellm-dashboard/src/lib/http/schema.d.ts index 855aac16f03..a115de0fdd0 100644 --- a/litellm/ui/litellm-dashboard/src/lib/http/schema.d.ts +++ b/litellm/ui/litellm-dashboard/src/lib/http/schema.d.ts @@ -9934,8 +9934,8 @@ export interface paths { cookie?: never; }; /** - * Get Customer Portal Limits - * @description Get customer portal free-tier limits and current capacity. Proxy admins only. + * Get Customer Management Limits + * @description Get Customer Management free-tier limits and current capacity. Proxy admins only. */ get: operations["get_customer_portal_limits_management_v1_customer_portal_limits_get"]; put?: never; diff --git a/tests/unit/proxy/management_endpoints/management_v1/test_customers.py b/tests/unit/proxy/management_endpoints/management_v1/test_customers.py index 7a862d99422..64126c6df52 100644 --- a/tests/unit/proxy/management_endpoints/management_v1/test_customers.py +++ b/tests/unit/proxy/management_endpoints/management_v1/test_customers.py @@ -78,7 +78,7 @@ def test_customer_portal_limits_and_free_tier_problem(premium: bool) -> None: assert sixth.status_code == (201 if premium else 403), sixth.text if not premium: assert sixth.json()["detail"] == ( - "Free customer portal limit reached: up to 5 customer organizations, 5 teams per organization and " + "Customer Management free tier limit reached: up to 5 customer organizations, 5 teams per organization and " "5 members per team without a LiteLLM Enterprise license. Upgrade to Enterprise to remove the limits: " "https://www.litellm.ai/enterprise" ) @@ -161,9 +161,9 @@ def test_capacity_contention_is_retryable_without_hiding_other_database_errors(e assert response.status_code == 503, response.text assert response.json() == { "type": "urn:litellm:error:customer-hierarchy-capacity-busy", - "title": "Customer portal busy", + "title": "Customer Management busy", "status": 503, - "detail": "Customer portal capacity is being updated. Retry the request.", + "detail": "Customer Management capacity is being updated. Retry the request.", } assert http.get("/management/v1/customer_members/blocked").status_code == 404 @@ -197,9 +197,9 @@ def test_team_model_write_contention_is_retryable_and_rolls_back(error: DataErro assert response.status_code == 503, response.text assert response.json() == { "type": "urn:litellm:error:customer-hierarchy-capacity-busy", - "title": "Customer portal busy", + "title": "Customer Management busy", "status": 503, - "detail": "Customer portal capacity is being updated. Retry the request.", + "detail": "Customer Management capacity is being updated. Retry the request.", } assert http.get("/management/v1/customer_teams/blocked").status_code == 404 assert not database.litellm_budgettable.rows