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
test(ui): trim rationale comments in the Old Usage gate tests
Yuneng Jiangdc69f6e4a230
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/old-usage/_components/usage.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/old-usage/_components/usage.test.tsxindex 4cf210c6e38..0e4455ee912 100644--- a/ui/litellm-dashboard/src/app/(dashboard)/old-usage/_components/usage.test.tsx+++ b/ui/litellm-dashboard/src/app/(dashboard)/old-usage/_components/usage.test.tsx@@ -49,10 +49,7 @@ const renderUsage = (overrides: Partial<React.ComponentProps<typeof UsagePage>>/>,);-// Mount fires two effects whose requests sit behind a promise chain-// (proxy settings, then the spend query). "proves the flush window is wide-// enough" below keeps this honest: it asserts the same flush surfaces those-// requests for an admin, so a denied role's silence means the gate held.+// Width of this window is guarded by "proves the flush window is wide enough".const flushPendingRequests = async () => {await act(async () => {await new Promise((resolve) => setTimeout(resolve, 0));@@ -196,9 +193,7 @@ describe("old usage page", () => {});});- // Every role below is served 401 on /global/spend/* by the proxy. Org admins- // and team admins reach the UI as "Internal User" — `org_admin` is an- // organization membership role, never a top-level user_role.+ // org_admin is an organization membership role; those users reach the UI as "Internal User".describe.each(["Internal User", "Internal Viewer", "internal_user", "internal_user_viewer", "Org Admin"])("as %s",(userRole) => {diff --git a/ui/litellm-dashboard/src/utils/capabilities.test.ts b/ui/litellm-dashboard/src/utils/capabilities.test.tsindex 56eaecd7a5f..3492223c5e8 100644--- a/ui/litellm-dashboard/src/utils/capabilities.test.ts+++ b/ui/litellm-dashboard/src/utils/capabilities.test.ts@@ -38,11 +38,6 @@ describe("hasCapability", () => {});});-// Backend truth table for the `/global/spend/*` routes the Old Usage page calls-// (verified against a live proxy): only proxy_admin and proxy_admin_viewer are-// served. Org admins and team admins carry `internal_user` as their top-level-// user_role, so `effectiveSessionRole` renders them "Internal User" — an org-// admin never reaches the UI as "Org Admin" or `org_admin`.describe("hasCapability - viewGlobalSpend", () => {it.each(ADMIN_ROLES)("should grant it to %s", (role) => {expect(hasCapability(role, "viewGlobalSpend")).toBe(true);