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
fix(ui): stop clamping the budgets Budget ID column at 15 characters
Yuneng Jiang7eee260ca84e
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/budgets/_components/BudgetTable.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/budgets/_components/BudgetTable.test.tsxindex 9a7a7bd2eb9..2b97bcbc072 100644--- a/ui/litellm-dashboard/src/app/(dashboard)/budgets/_components/BudgetTable.test.tsx+++ b/ui/litellm-dashboard/src/app/(dashboard)/budgets/_components/BudgetTable.test.tsx@@ -35,6 +35,15 @@ describe("BudgetTable", () => {expect(screen.getByText("10")).toBeInTheDocument();});+ it("should render the budget id without a fixed character-count clamp", () => {+ const budgetId = "ecc1869c-6231-4380-a56d-1a0be457477d";+ renderWithProviders(<BudgetTable {...defaultProps} budgets={[makeBudget({ budget_id: budgetId })]} />);+ const idCell = screen.getByText(budgetId);+ expect(idCell.className).not.toMatch(/max-w-\[\d+(ch|rem|px)\]/);+ expect(idCell.className).toContain("max-w-full");+ expect(idCell.className).toContain("truncate");+ });+it("should show n/a for missing rate limits and Unlimited for a missing max budget", () => {renderWithProviders(<BudgetTable {...defaultProps} budgets={[makeBudget({ max_budget: null, tpm_limit: null, rpm_limit: null })]} />,diff --git a/ui/litellm-dashboard/src/app/(dashboard)/budgets/_components/BudgetTableColumns.tsx b/ui/litellm-dashboard/src/app/(dashboard)/budgets/_components/BudgetTableColumns.tsxindex 456ab9d6b68..e3fbc9dba08 100644--- a/ui/litellm-dashboard/src/app/(dashboard)/budgets/_components/BudgetTableColumns.tsx+++ b/ui/litellm-dashboard/src/app/(dashboard)/budgets/_components/BudgetTableColumns.tsx@@ -75,7 +75,7 @@ export const getBudgetTableColumns = ({header: "Budget ID",size: 220,enableSorting: false,- cell: ({ row }) => <IdCell value={row.original.budget_id} variant="plain" />,+ cell: ({ row }) => <IdCell value={row.original.budget_id} variant="plain" className="max-w-full" />,},{id: "max_budget",diff --git a/ui/litellm-dashboard/src/components/shared/table_cells/id_cell.test.tsx b/ui/litellm-dashboard/src/components/shared/table_cells/id_cell.test.tsxindex 41da4519018..1a87f17d50b 100644--- a/ui/litellm-dashboard/src/components/shared/table_cells/id_cell.test.tsx+++ b/ui/litellm-dashboard/src/components/shared/table_cells/id_cell.test.tsx@@ -28,18 +28,10 @@ describe("IdCell", () => {expect(el.tagName).toBe("SPAN");expect(el.className).toContain("bg-blue-50");expect(el.className).toContain("font-mono");- expect(el.className).toContain("max-w-full");+ expect(el.className).toContain("max-w-[15ch]");expect(el.className).toContain("truncate");});- it("clamps to the containing cell rather than a fixed character count", () => {- render(<IdCell value="ecc1869c-6231-4380-a56d-1a0be457477d" />);- const el = screen.getByText("ecc1869c-6231-4380-a56d-1a0be457477d");- expect(el.className).not.toMatch(/max-w-\[\d+(ch|rem|px)\]/);- expect(el.className).toContain("inline-block");- expect(el.className).toContain("max-w-full");- });-it("renders plain mono text without pill styling for the plain variant", () => {render(<IdCell value="req-123" variant="plain" />);const el = screen.getByText("req-123");diff --git a/ui/litellm-dashboard/src/components/shared/table_cells/id_cell.tsx b/ui/litellm-dashboard/src/components/shared/table_cells/id_cell.tsxindex c8b75ee96e9..6fbd2e2f9ed 100644--- a/ui/litellm-dashboard/src/components/shared/table_cells/id_cell.tsx+++ b/ui/litellm-dashboard/src/components/shared/table_cells/id_cell.tsx@@ -54,7 +54,7 @@ export function IdCell({const classes = cn(VARIANT_CLASS[variant].base,clickable && VARIANT_CLASS[variant].clickable,- truncate && "inline-block max-w-full truncate",+ truncate && "block max-w-[15ch] truncate",disabled && "opacity-50",className,);