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]

fix(ui): let the auto-router scoring tier list follow the theme (#39040)

tin-berri0565d33fa50b
diff --git a/ui/litellm-dashboard/src/components/add_model/ClassificationMethodConfig.tsx b/ui/litellm-dashboard/src/components/add_model/ClassificationMethodConfig.tsx
index 2947e29319b..84f61c95eca 100644
--- a/ui/litellm-dashboard/src/components/add_model/ClassificationMethodConfig.tsx
+++ b/ui/litellm-dashboard/src/components/add_model/ClassificationMethodConfig.tsx
@@ -111,7 +111,7 @@ const HowClassificationWorks: React.FC<{ value: ComplexityRouterConfigValue }> =
<strong className="block mb-2 font-semibold">How Classification Works</strong>
<span className="text-[13px] text-muted-foreground">{scoringExplanation(value)}</span>
{scorerRuns && ranges && (
- <ul style={{ marginTop: 8, marginBottom: 0, paddingLeft: 20, fontSize: 13, color: "rgba(0, 0, 0, 0.45)" }}>
+ <ul className="mt-2 pl-5 text-[13px] text-muted-foreground">
<li>
<strong>{effectiveTierLabel("SIMPLE", value.tier_labels)}</strong>: Score &lt; {ranges.simpleMedium}
</li>
diff --git a/ui/litellm-dashboard/src/components/add_model/ComplexityRouterConfig.test.tsx b/ui/litellm-dashboard/src/components/add_model/ComplexityRouterConfig.test.tsx
index 33ce1169c46..218c99e32c5 100644
--- a/ui/litellm-dashboard/src/components/add_model/ComplexityRouterConfig.test.tsx
+++ b/ui/litellm-dashboard/src/components/add_model/ComplexityRouterConfig.test.tsx
@@ -80,6 +80,15 @@ describe("ComplexityRouterConfig", () => {
expect(screen.getByText(/Score > 0.60/)).toBeInTheDocument();
});
+ it("leaves the score threshold list color to the theme instead of an inline style", () => {
+ renderWithProviders(<ComplexityRouterConfig {...baseProps} />);
+ fireEvent.click(screen.getByText("Advanced: Classification Method"));
+ const list = screen.getByText(/Score < 0.15/).closest<HTMLUListElement>("ul");
+ expect(list).toBeInTheDocument();
+ expect(list).toHaveClass("text-muted-foreground");
+ expect(list?.style.color).toBe("");
+ });
+
it("should default to heuristic and hide classifier model/timeout fields", () => {
renderWithProviders(<ComplexityRouterConfig modelInfo={mockModelInfo} value={defaultValue} onChange={vi.fn()} />);
expect(screen.getByText("Advanced: Classification Method")).toBeInTheDocument();