Merge pull request #35268 from BerriAI/litellm_/budgets-table-truncation-4b98ec

fix(ui): stop clamping the budgets Budget ID column at 15 characters
This commit is contained in:
yuneng-jiang 2026-07-30 15:54:23 -07:00 committed by GitHub
commit abb0e36ca5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View file

@ -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 })]} />,

View file

@ -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",