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]

refactor(ui): drop explanatory comments from the migration tests

Yuneng Jiang538f5b3e8411
diff --git a/ui/litellm-dashboard/src/components/key_team_helpers/TagRateLimitEditor.test.tsx b/ui/litellm-dashboard/src/components/key_team_helpers/TagRateLimitEditor.test.tsx
index ba53837dc4d..85f02f2045e 100644
--- a/ui/litellm-dashboard/src/components/key_team_helpers/TagRateLimitEditor.test.tsx
+++ b/ui/litellm-dashboard/src/components/key_team_helpers/TagRateLimitEditor.test.tsx
@@ -4,8 +4,6 @@ import userEvent from "@testing-library/user-event";
import { describe, it, expect } from "vitest";
import { TagRateLimitEditor, TagRateLimitEntry, tagLimitsToRows, tagRowsToLimits } from "./TagRateLimitEditor";
-// The editor is controlled, so multi-character typing only behaves realistically
-// when the parent feeds each change back in.
function Harness({ initial = [] as TagRateLimitEntry[], onValue }: { initial?: TagRateLimitEntry[]; onValue?: any }) {
const [rows, setRows] = useState<TagRateLimitEntry[]>(initial);
return (
@@ -47,8 +45,6 @@ describe("TagRateLimitEditor", () => {
expect(screen.getByRole("textbox", { name: "Tag" })).toHaveValue("cell-2");
});
- // The RPM cell feeds tagRowsToLimits, which drops any entry whose limit is not
- // typeof "number". A string would silently discard the user's limit.
it("should record the typed RPM limit as a number, not a string", async () => {
const user = userEvent.setup();
const seen: TagRateLimitEntry[][] = [];
diff --git a/ui/litellm-dashboard/src/components/router_settings/index.test.tsx b/ui/litellm-dashboard/src/components/router_settings/index.test.tsx
index 788886f30c7..72657069cde 100644
--- a/ui/litellm-dashboard/src/components/router_settings/index.test.tsx
+++ b/ui/litellm-dashboard/src/components/router_settings/index.test.tsx
@@ -134,9 +134,6 @@ describe("RouterSettings", () => {
);
});
- // handleSaveChanges reads each setting's value straight off the DOM via
- // document.querySelector('input[name="..."]'), so the payload only stays correct
- // while the rendered input keeps its name attribute and its live value.
it("should send the edited input value, not the loaded one, on Save Changes", async () => {
const user = userEvent.setup();
renderWithProviders(<RouterSettings {...defaultProps} />);
diff --git a/ui/litellm-dashboard/src/components/shared/numerical_input.tsx b/ui/litellm-dashboard/src/components/shared/numerical_input.tsx
index c8c5d353a6d..2356bd5600f 100644
--- a/ui/litellm-dashboard/src/components/shared/numerical_input.tsx
+++ b/ui/litellm-dashboard/src/components/shared/numerical_input.tsx
@@ -7,7 +7,7 @@ interface NumericalInputProps {
placeholder?: string;
min?: number;
max?: number;
- onChange?: any; // Using any to avoid type conflicts with callers that pass antd Form handlers
+ onChange?: any;
[key: string]: any;
}