Skip to content

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]

style(ui): format new playground tests and drop suppressions this stack fixed

mubashir1osmanif3f8c48b1d81
diff --git a/ui/litellm-dashboard/eslint-suppressions.json b/ui/litellm-dashboard/eslint-suppressions.json
index a4dcf0f6c73..eb5f8e258ab 100644
--- a/ui/litellm-dashboard/eslint-suppressions.json
+++ b/ui/litellm-dashboard/eslint-suppressions.json
@@ -244,11 +244,6 @@
"count": 1
}
},
- "src/app/(dashboard)/cost-tracking/_components/pricing_calculator/multi_cost_results.test.tsx": {
- "unused-imports/no-unused-imports": {
- "count": 1
- }
- },
"src/app/(dashboard)/cost-tracking/_components/pricing_calculator/multi_cost_results.tsx": {
"local/filename-pascal-case": {
"count": 1
@@ -267,11 +262,6 @@
"count": 1
}
},
- "src/app/(dashboard)/cost-tracking/_components/provider_discount_table.test.tsx": {
- "unused-imports/no-unused-imports": {
- "count": 1
- }
- },
"src/app/(dashboard)/cost-tracking/_components/provider_discount_table.tsx": {
"local/filename-pascal-case": {
"count": 1
@@ -341,7 +331,7 @@
},
"src/app/(dashboard)/guardrails/_components/GuardrailTestResults.tsx": {
"no-restricted-imports": {
- "count": 2
+ "count": 1
}
},
"src/app/(dashboard)/guardrails/_components/GuardrailsPanel.tsx": {
@@ -788,11 +778,6 @@
"count": 1
}
},
- "src/app/(dashboard)/mcp-servers/_components/MCPLogoSelector.test.tsx": {
- "unused-imports/no-unused-imports": {
- "count": 1
- }
- },
"src/app/(dashboard)/mcp-servers/_components/MCPNetworkSettings.tsx": {
"react-hooks/immutability": {
"count": 2
@@ -1046,15 +1031,7 @@
"count": 1
}
},
- "src/app/(dashboard)/playground/components/chat_ui/A2AMetrics.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
"src/app/(dashboard)/playground/components/chat_ui/AdditionalModelSettings.tsx": {
- "no-restricted-imports": {
- "count": 2
- },
"react-hooks/set-state-in-effect": {
"count": 2
}
@@ -1070,11 +1047,6 @@
"count": 5
}
},
- "src/app/(dashboard)/playground/components/chat_ui/ChatImageUpload.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
"src/app/(dashboard)/playground/components/chat_ui/ChatImageUtils.test.tsx": {
"max-nested-callbacks": {
"count": 1
@@ -1087,48 +1059,26 @@
},
"src/app/(dashboard)/playground/components/chat_ui/ChatUI.tsx": {
"local/no-complex-jsx-arrow": {
- "count": 2
+ "count": 1
},
"max-lines": {
"count": 1
},
"no-nested-ternary": {
- "count": 7
- },
- "no-restricted-imports": {
- "count": 2
- },
- "prefer-const": {
- "count": 1
+ "count": 6
},
"react-hooks/set-state-in-effect": {
"count": 4
- },
- "unused-imports/no-unused-imports": {
- "count": 13
}
},
"src/app/(dashboard)/playground/components/chat_ui/CodeInterpreterOutput.tsx": {
"no-nested-ternary": {
"count": 1
},
- "no-restricted-imports": {
- "count": 1
- },
"no-restricted-syntax": {
"count": 2
}
},
- "src/app/(dashboard)/playground/components/chat_ui/CodeInterpreterTool.tsx": {
- "no-restricted-imports": {
- "count": 2
- }
- },
- "src/app/(dashboard)/playground/components/chat_ui/EndpointSelector.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
"src/app/(dashboard)/playground/components/chat_ui/RealtimePlayground.tsx": {
"no-nested-ternary": {
"count": 2
@@ -1143,21 +1093,6 @@
"count": 1
}
},
- "src/app/(dashboard)/playground/components/chat_ui/ResponsesImageUpload.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
- "src/app/(dashboard)/playground/components/chat_ui/SearchResultsDisplay.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
- "src/app/(dashboard)/playground/components/chat_ui/SessionManagement.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
"src/app/(dashboard)/playground/components/compareUI/CompareUI.tsx": {
"max-lines": {
"count": 1
@@ -1295,11 +1230,6 @@
"count": 1
}
},
- "src/app/(dashboard)/playground/page.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
"src/app/(dashboard)/policies/_components/add_attachment_form.tsx": {
"local/filename-pascal-case": {
"count": 1
@@ -2038,11 +1968,6 @@
"count": 1
}
},
- "src/components/HelpLink.test.tsx": {
- "unused-imports/no-unused-imports": {
- "count": 1
- }
- },
"src/components/LicenseExpiryBanner.tsx": {
"no-restricted-imports": {
"count": 1
@@ -2468,9 +2393,6 @@
"src/components/agent_management/AgentSelector.test.tsx": {
"react/display-name": {
"count": 1
- },
- "unused-imports/no-unused-imports": {
- "count": 1
}
},
"src/components/agent_management/AgentSelector.tsx": {
@@ -2544,21 +2466,6 @@
"count": 2
}
},
- "src/components/chat_ui/MCPEventsDisplay.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
- "src/components/chat_ui/ReasoningContent.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
- "src/components/chat_ui/ResponseMetrics.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
"src/components/chat_ui/mode_endpoint_mapping.tsx": {
"local/filename-pascal-case": {
"count": 1
@@ -2842,11 +2749,6 @@
"count": 1
}
},
- "src/components/guardrails/GuardrailSelector.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
"src/components/key_info_utils.tsx": {
"local/filename-pascal-case": {
"count": 1
@@ -3064,9 +2966,6 @@
"src/components/navbar.test.tsx": {
"prefer-const": {
"count": 1
- },
- "unused-imports/no-unused-imports": {
- "count": 1
}
},
"src/components/navbar.tsx": {
@@ -3199,9 +3098,6 @@
"src/components/policies/PolicySelector.tsx": {
"no-nested-ternary": {
"count": 1
- },
- "no-restricted-imports": {
- "count": 1
}
},
"src/components/price_data_reload.tsx": {
@@ -3312,7 +3208,7 @@
"count": 3
},
"prefer-const": {
- "count": 7
+ "count": 4
}
},
"src/components/shared/CreatedKeyDisplay.tsx": {
@@ -3437,11 +3333,6 @@
"count": 1
}
},
- "src/components/tag_management/TagSelector.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
"src/components/tag_management/types.tsx": {
"local/filename-pascal-case": {
"count": 1
@@ -3524,11 +3415,6 @@
"count": 2
}
},
- "src/components/templates/key_info_view.test.tsx": {
- "unused-imports/no-unused-imports": {
- "count": 2
- }
- },
"src/components/templates/key_info_view.tsx": {
"local/filename-pascal-case": {
"count": 1
@@ -3734,16 +3620,6 @@
"count": 1
}
},
- "src/components/vector_store_management/VectorStoreSelector.test.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
- "src/components/vector_store_management/VectorStoreSelector.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
"src/components/vector_store_management/types.tsx": {
"local/filename-pascal-case": {
"count": 1
@@ -3838,11 +3714,6 @@
"count": 1
}
},
- "src/components/view_logs/LogDetailsDrawer/RealtimePrettyView.test.tsx": {
- "unused-imports/no-unused-imports": {
- "count": 2
- }
- },
"src/components/view_logs/LogDetailsDrawer/RealtimePrettyView.tsx": {
"no-restricted-imports": {
"count": 1
@@ -4027,5 +3898,35 @@
"react/display-name": {
"count": 1
}
+ },
+ "src/app/(dashboard)/cost-tracking/_components/pricing_calculator/multi_cost_results.test.tsx": {
+ "unused-imports/no-unused-imports": {
+ "count": 1
+ }
+ },
+ "src/app/(dashboard)/cost-tracking/_components/provider_discount_table.test.tsx": {
+ "unused-imports/no-unused-imports": {
+ "count": 1
+ }
+ },
+ "src/app/(dashboard)/mcp-servers/_components/MCPLogoSelector.test.tsx": {
+ "unused-imports/no-unused-imports": {
+ "count": 1
+ }
+ },
+ "src/components/HelpLink.test.tsx": {
+ "unused-imports/no-unused-imports": {
+ "count": 1
+ }
+ },
+ "src/components/templates/key_info_view.test.tsx": {
+ "unused-imports/no-unused-imports": {
+ "count": 2
+ }
+ },
+ "src/components/view_logs/LogDetailsDrawer/RealtimePrettyView.test.tsx": {
+ "unused-imports/no-unused-imports": {
+ "count": 2
+ }
}
}
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/ChatComposer.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/ChatComposer.test.tsx
index f546b58215a..f3efb0a9b0f 100644
--- a/ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/ChatComposer.test.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/ChatComposer.test.tsx
@@ -3,15 +3,7 @@ import { describe, expect, it, vi } from "vitest";
import { ChatComposer } from "./ChatComposer";
const renderComposer = (props: Partial<React.ComponentProps<typeof ChatComposer>> = {}) =>
- render(
- <ChatComposer
- value=""
- onChange={vi.fn()}
- onSubmit={vi.fn()}
- placeholder="Send a message"
- {...props}
- />,
- );
+ render(<ChatComposer value="" onChange={vi.fn()} onSubmit={vi.fn()} placeholder="Send a message" {...props} />);
const addonOf = (container: HTMLElement) =>
container.querySelector<HTMLElement>("[data-slot=input-group-addon]") as HTMLElement;
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/EndpointUtils.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/EndpointUtils.test.tsx
index 3360461041d..778effdaea6 100644
--- a/ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/EndpointUtils.test.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/EndpointUtils.test.tsx
@@ -198,10 +198,9 @@ describe("determineEndpointType", () => {
describe("isModelCompatibleWithEndpoint / filterModelsForEndpoint", () => {
beforeEach(async () => {
- const actual =
- await vi.importActual<typeof import("@/components/chat_ui/mode_endpoint_mapping")>(
- "@/components/chat_ui/mode_endpoint_mapping",
- );
+ const actual = await vi.importActual<typeof import("@/components/chat_ui/mode_endpoint_mapping")>(
+ "@/components/chat_ui/mode_endpoint_mapping",
+ );
vi.mocked(getEndpointType).mockImplementation(actual.getEndpointType);
});
@@ -253,8 +252,8 @@ describe("isModelCompatibleWithEndpoint / filterModelsForEndpoint", () => {
const imageModel: ModelGroup = { model_group: "dall-e-3", mode: "image_generation" };
expect(isModelCompatibleWithEndpoint(imageEditModel, EndpointType.IMAGE_EDITS)).toBe(true);
- expect(filterModelsForEndpoint([imageEditModel, imageModel], EndpointType.IMAGE_EDITS).map((m) => m.model_group)).toEqual(
- ["gpt-image-1", "dall-e-3"],
- );
+ expect(
+ filterModelsForEndpoint([imageEditModel, imageModel], EndpointType.IMAGE_EDITS).map((m) => m.model_group),
+ ).toEqual(["gpt-image-1", "dall-e-3"]);
});
});