diff --git a/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/AllModelsTab.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/AllModelsTab.test.tsx
index 6ec3945a499..d7372258ee0 100644
--- a/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/AllModelsTab.test.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/components/AllModelsTab.test.tsx
@@ -1,9 +1,9 @@
+import * as useAuthorizedModule from "@/app/(dashboard)/hooks/useAuthorized";
+import * as useTeamsModule from "@/app/(dashboard)/hooks/useTeams";
import { render, screen, waitFor } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
-import { describe, it, expect, beforeAll, vi, beforeEach } from "vitest";
+import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import AllModelsTab from "./AllModelsTab";
-import * as useTeamsModule from "@/app/(dashboard)/hooks/useTeams";
-import * as useAuthorizedModule from "@/app/(dashboard)/hooks/useAuthorized";
// Mock window.matchMedia for Ant Design components
beforeAll(() => {
@@ -248,4 +248,62 @@ describe("AllModelsTab", () => {
expect(screen.getByText("Showing 1 - 1 of 1 results")).toBeInTheDocument();
});
});
+
+ it("should show disabled delete icon for config models", async () => {
+ // Mock useTeams hook
+ vi.spyOn(useTeamsModule, "default").mockReturnValue({
+ teams: [],
+ setTeams: vi.fn(),
+ });
+
+ const modelData = {
+ data: [
+ {
+ model_name: "gpt-4-config",
+ litellm_model_name: "gpt-4-config",
+ provider: "openai",
+ model_info: {
+ id: "model-config-1",
+ db_model: false, // Config model (no db_model)
+ direct_access: true,
+ access_via_team_ids: [],
+ access_groups: [],
+ created_by: "user-123",
+ created_at: "2024-01-01",
+ updated_at: "2024-01-01",
+ },
+ },
+ {
+ model_name: "gpt-4-db",
+ litellm_model_name: "gpt-4-db",
+ provider: "openai",
+ model_info: {
+ id: "model-db-1",
+ db_model: true, // DB model
+ direct_access: true,
+ access_via_team_ids: [],
+ access_groups: [],
+ created_by: "user-123",
+ created_at: "2024-01-01",
+ updated_at: "2024-01-01",
+ },
+ },
+ ],
+ };
+
+ const { container } = render(