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]

chore(ui): migrate router_settings page from Tremor to antd

Ryan Crabbe72be35f9b81d
diff --git a/ui/litellm-dashboard/src/components/router_settings/LatencyBasedConfiguration.tsx b/ui/litellm-dashboard/src/components/router_settings/LatencyBasedConfiguration.tsx
index 9c776c94a0b..1c2d52cf0c5 100644
--- a/ui/litellm-dashboard/src/components/router_settings/LatencyBasedConfiguration.tsx
+++ b/ui/litellm-dashboard/src/components/router_settings/LatencyBasedConfiguration.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import { TextInput } from "@tremor/react";
+import { Input } from "antd";
interface routingStrategyArgs {
ttl?: number;
@@ -42,7 +42,7 @@ const LatencyBasedConfiguration: React.FC<LatencyBasedConfigurationProps> = ({
<p className="text-xs text-gray-500 mt-0.5 mb-2">
{paramExplanation[param] || ""}
</p>
- <TextInput
+ <Input
name={param}
defaultValue={typeof value === "object" ? JSON.stringify(value, null, 2) : value?.toString()}
className="font-mono text-sm w-full"
diff --git a/ui/litellm-dashboard/src/components/router_settings/ReliabilityRetriesSection.tsx b/ui/litellm-dashboard/src/components/router_settings/ReliabilityRetriesSection.tsx
index d217a45358b..3005822ab88 100644
--- a/ui/litellm-dashboard/src/components/router_settings/ReliabilityRetriesSection.tsx
+++ b/ui/litellm-dashboard/src/components/router_settings/ReliabilityRetriesSection.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import { TextInput } from "@tremor/react";
+import { Input } from "antd";
interface ReliabilityRetriesSectionProps {
routerSettings: { [key: string]: any };
@@ -36,7 +36,7 @@ const ReliabilityRetriesSection: React.FC<ReliabilityRetriesSectionProps> = ({
<p className="text-xs text-gray-500 mt-0.5 mb-2">
{routerFieldsMetadata[param]?.field_description || ""}
</p>
- <TextInput
+ <Input
name={param}
defaultValue={
value === null || value === undefined || value === "null"
diff --git a/ui/litellm-dashboard/src/components/router_settings/TagFilteringToggle.tsx b/ui/litellm-dashboard/src/components/router_settings/TagFilteringToggle.tsx
index 2b53a48c3aa..725c75a3f67 100644
--- a/ui/litellm-dashboard/src/components/router_settings/TagFilteringToggle.tsx
+++ b/ui/litellm-dashboard/src/components/router_settings/TagFilteringToggle.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import { Switch } from "@tremor/react";
+import { Switch } from "antd";
interface TagFilteringToggleProps {
enabled: boolean;
diff --git a/ui/litellm-dashboard/src/components/router_settings/index.tsx b/ui/litellm-dashboard/src/components/router_settings/index.tsx
index aaad5306832..5bd01321221 100644
--- a/ui/litellm-dashboard/src/components/router_settings/index.tsx
+++ b/ui/litellm-dashboard/src/components/router_settings/index.tsx
@@ -1,4 +1,4 @@
-import { Button } from "@tremor/react";
+import { Button } from "antd";
import React, { useEffect, useState } from "react";
import NotificationsManager from "../molecules/notifications_manager";
import { getCallbacksCall, getRouterSettingsCall, setCallbacksCall } from "../networking";
@@ -191,10 +191,10 @@ const RouterSettings: React.FC<RouterSettingsProps> = ({ accessToken, userRole,
{/* Actions - Sticky at bottom */}
<div className="border-t border-gray-200 pt-6 flex justify-end gap-3">
- <Button variant="secondary" size="sm" onClick={() => window.location.reload()} className="text-sm">
+ <Button onClick={() => window.location.reload()}>
Reset
</Button>
- <Button size="sm" onClick={handleSaveChanges} className="text-sm font-medium">
+ <Button type="primary" onClick={handleSaveChanges}>
Save Changes
</Button>
</div>