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): use antd in GuardrailSettingsView and document the rule

Ryan Crabbe842523a9185a
diff --git a/AGENTS.md b/AGENTS.md
index 37411938e2f..9493a3404a6 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -51,7 +51,9 @@ LiteLLM is a unified interface for 100+ LLMs that:
### MAKING CODE CHANGES FOR THE UI (IGNORE FOR BACKEND)
-1. **Tremor is DEPRECATED, do not use Tremor components in new features/changes**
+1. **Always use `antd` for new UI components — Tremor is DEPRECATED**
+ - We are migrating off of `@tremor/react`. Do not introduce new `Badge`, `Text`, `Card`, `Grid`, `Title`, or other imports from `@tremor/react` in any new or modified file.
+ - Use `antd` equivalents: `Tag` for labels, plain `<span>`/`<div>` with Tailwind classes (or `Typography.Text`) for text, `Card` from `antd`, etc. Note that `antd` has no `"yellow"` Tag color — use `"gold"` for amber/yellow.
- The only exception is the Tremor Table component and its required Tremor Table sub components.
2. **Use Common Components as much as possible**:
diff --git a/CLAUDE.md b/CLAUDE.md
index a8800ff8884..a4e723d5b17 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -109,6 +109,9 @@ LiteLLM is a unified interface for 100+ LLM providers with two main components:
### UI / Backend Consistency
- When wiring a new UI entity type to an existing backend endpoint, verify the backend API contract (single value vs. array, required vs. optional params) and ensure the UI controls match — e.g., use a single-select dropdown when the backend accepts a single value, not a multi-select
+### UI Component Library
+- **Always use `antd` for new UI components** — we are migrating off of `@tremor/react`. Do not introduce new `Badge`, `Text`, `Card`, `Grid`, `Title`, or other imports from `@tremor/react` in any new or modified file. Use `antd` equivalents: `Tag` for labels, plain `<span>`/`<div>` with Tailwind classes (or `Typography.Text`) for text, `Card` from `antd`, etc. Note that `antd` has no `"yellow"` Tag color — use `"gold"` for amber/yellow.
+
### MCP OAuth / OpenAPI Transport Mapping
- `TRANSPORT.OPENAPI` is a UI-only concept. The backend only accepts `"http"`, `"sse"`, or `"stdio"`. Always map it to `"http"` before any API call (including pre-OAuth temp-session calls).
- FastAPI validation errors return `detail` as an array of `{loc, msg, type}` objects. Error extractors must handle: array (map `.msg`), string, nested `{error: string}`, and fallback.
diff --git a/ui/litellm-dashboard/src/components/GuardrailSettingsView.tsx b/ui/litellm-dashboard/src/components/GuardrailSettingsView.tsx
index 16cd46e37d6..e322ce29785 100644
--- a/ui/litellm-dashboard/src/components/GuardrailSettingsView.tsx
+++ b/ui/litellm-dashboard/src/components/GuardrailSettingsView.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import { Badge, Text } from "@tremor/react";
+import { Tag } from "antd";
import { GlobalOutlined } from "@ant-design/icons";
interface GuardrailSettingsViewProps {
@@ -31,40 +31,40 @@ export function GuardrailSettingsView({
!killSwitchOn && globalsRunning.length === 0 && nonGlobalOptIns.length === 0;
const content = isEmpty ? (
- <Text className="text-gray-500">No guardrails configured</Text>
+ <span className="block text-gray-500">No guardrails configured</span>
) : (
<div className="flex flex-col gap-4">
<div>
- <Text className="text-sm font-medium text-gray-700 mb-2">
+ <span className="block text-sm font-medium text-gray-700 mb-2">
<GlobalOutlined style={{ marginInlineEnd: 4 }} aria-label="Global guardrail" />
Global
- </Text>
+ </span>
{killSwitchOn ? (
- <Badge color="yellow">Bypassed for this team</Badge>
+ <Tag color="gold">Bypassed for this team</Tag>
) : globalsRunning.length > 0 ? (
<div className="flex flex-wrap gap-2">
{globalsRunning.map((name) => (
- <Badge key={name} color="blue">
+ <Tag key={name} color="blue">
{name}
- </Badge>
+ </Tag>
))}
</div>
) : (
- <Text className="text-gray-500 text-sm">None configured</Text>
+ <span className="block text-sm text-gray-500">None configured</span>
)}
</div>
<div>
- <Text className="text-sm font-medium text-gray-700 mb-2">Team-specific</Text>
+ <span className="block text-sm font-medium text-gray-700 mb-2">Team-specific</span>
{nonGlobalOptIns.length > 0 ? (
<div className="flex flex-wrap gap-2">
{nonGlobalOptIns.map((name) => (
- <Badge key={name} color="blue">
+ <Tag key={name} color="blue">
{name}
- </Badge>
+ </Tag>
))}
</div>
) : (
- <Text className="text-gray-500 text-sm">None configured</Text>
+ <span className="block text-sm text-gray-500">None configured</span>
)}
</div>
</div>