Merge pull request #37021 from BerriAI/litellm_models_source_column

fix(ui): rename models table Status column to Source
This commit is contained in:
yuneng-jiang 2026-08-15 10:55:06 -07:00 committed by GitHub
commit 487da4d1e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 5 deletions

View file

@ -192,7 +192,7 @@ describe("AllModelsTab", () => {
expect(lastModelsInfoCall().sortOrder).toBe(firstDirection);
});
it("maps the hidden Status column to the server field status", () => {
it("maps the hidden Source column to the server field status", () => {
expect(toServerSortField(STATUS_COLUMN_ID)).toBe("status");
});

View file

@ -79,7 +79,7 @@ const row = (modelId: string): HTMLElement => {
};
describe("AllModelsTable", () => {
it("renders the nine design columns and hides Status behind the Columns menu", async () => {
it("renders the nine design columns and hides Source behind the Columns menu", async () => {
const user = userEvent.setup();
render(<AllModelsTable {...baseProps} />);
@ -97,12 +97,15 @@ describe("AllModelsTable", () => {
expect(screen.getByRole("columnheader", { name: new RegExp(header, "i") })).toBeInTheDocument();
}
expect(screen.queryByRole("columnheader", { name: /^source$/i })).not.toBeInTheDocument();
expect(screen.queryByRole("columnheader", { name: /^status$/i })).not.toBeInTheDocument();
expect(screen.queryByText("DB Model")).not.toBeInTheDocument();
await user.click(screen.getByRole("button", { name: /columns/i }));
await user.click(await screen.findByRole("menuitemcheckbox", { name: /status/i }));
expect(screen.queryByRole("menuitemcheckbox", { name: /status/i })).not.toBeInTheDocument();
await user.click(await screen.findByRole("menuitemcheckbox", { name: /^source$/i }));
expect(await screen.findByRole("columnheader", { name: /^source$/i })).toBeInTheDocument();
expect(await screen.findByText("DB Model")).toBeInTheDocument();
});

View file

@ -453,8 +453,8 @@ export const getModelsTableColumns = ({
{
id: STATUS_COLUMN_ID,
accessorFn: (row) => row.model_info.db_model,
meta: { title: "Status", skeleton: "badge" },
header: ({ column }) => <DataTableSortHeader column={column} title="Status" />,
meta: { title: "Source", skeleton: "badge" },
header: ({ column }) => <DataTableSortHeader column={column} title="Source" />,
enableSorting: true,
size: 140,
minSize: 100,