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/): fix linting errors

Krrish Dholakiaab9d09a46469
diff --git a/ui/litellm-dashboard/src/app/page.tsx b/ui/litellm-dashboard/src/app/page.tsx
index 987504538ca..f49972fa43d 100644
--- a/ui/litellm-dashboard/src/app/page.tsx
+++ b/ui/litellm-dashboard/src/app/page.tsx
@@ -432,6 +432,7 @@ export default function CreateKeyPage() {
userRole={userRole}
accessToken={accessToken}
teams={(teams as Team[]) ?? []}
+ premiumUser={premiumUser}
/>
) : (
<Usage
diff --git a/ui/litellm-dashboard/src/components/all_keys_table.tsx b/ui/litellm-dashboard/src/components/all_keys_table.tsx
index 02f93b107b7..57bc6ec8dc0 100644
--- a/ui/litellm-dashboard/src/components/all_keys_table.tsx
+++ b/ui/litellm-dashboard/src/components/all_keys_table.tsx
@@ -66,6 +66,7 @@ interface AllKeysTableProps {
sortBy: string;
sortOrder: 'asc' | 'desc';
};
+ premiumUser: boolean;
}
// Define columns similar to our logs table
@@ -140,6 +141,7 @@ export function AllKeysTable({
refresh,
onSortChange,
currentSort,
+ premiumUser,
}: AllKeysTableProps) {
const [selectedKeyId, setSelectedKeyId] = useState<string | null>(null);
const [userList, setUserList] = useState<UserResponse[]>([]);
@@ -606,6 +608,7 @@ export function AllKeysTable({
userID={userID}
userRole={userRole}
teams={allTeams}
+ premiumUser={premiumUser}
/>
) : (
<div className="border-b py-4 flex-1 overflow-hidden">
diff --git a/ui/litellm-dashboard/src/components/entity_usage.tsx b/ui/litellm-dashboard/src/components/entity_usage.tsx
index 4b159fb310c..ade70abaab0 100644
--- a/ui/litellm-dashboard/src/components/entity_usage.tsx
+++ b/ui/litellm-dashboard/src/components/entity_usage.tsx
@@ -61,6 +61,7 @@ interface EntityUsageProps {
userID: string | null;
userRole: string | null;
entityList: EntityList[] | null;
+ premiumUser: boolean;
}
const EntityUsage: React.FC<EntityUsageProps> = ({
@@ -69,7 +70,8 @@ const EntityUsage: React.FC<EntityUsageProps> = ({
entityId,
userID,
userRole,
- entityList
+ entityList,
+ premiumUser
}) => {
const [spendData, setSpendData] = useState<EntitySpendData>({
results: [],
@@ -472,6 +474,7 @@ const EntityUsage: React.FC<EntityUsageProps> = ({
userID={userID}
userRole={userRole}
teams={null}
+ premiumUser={premiumUser}
/>
</Card>
</Col>
diff --git a/ui/litellm-dashboard/src/components/new_usage.tsx b/ui/litellm-dashboard/src/components/new_usage.tsx
index c5917f96b2f..0040937245e 100644
--- a/ui/litellm-dashboard/src/components/new_usage.tsx
+++ b/ui/litellm-dashboard/src/components/new_usage.tsx
@@ -33,13 +33,15 @@ interface NewUsagePageProps {
userRole: string | null;
userID: string | null;
teams: Team[];
+ premiumUser: boolean;
}
const NewUsagePage: React.FC<NewUsagePageProps> = ({
accessToken,
userRole,
userID,
- teams
+ teams,
+ premiumUser
}) => {
const [userSpendData, setUserSpendData] = useState<{
results: DailyData[];
@@ -386,6 +388,7 @@ const NewUsagePage: React.FC<NewUsagePageProps> = ({
userID={userID}
userRole={userRole}
teams={null}
+ premiumUser={premiumUser}
/>
</Card>
</Col>
@@ -506,6 +509,7 @@ const NewUsagePage: React.FC<NewUsagePageProps> = ({
label: team.team_alias,
value: team.team_id
})) || null}
+ premiumUser={premiumUser}
/>
</TabPanel>
@@ -517,6 +521,7 @@ const NewUsagePage: React.FC<NewUsagePageProps> = ({
userID={userID}
userRole={userRole}
entityList={allTags}
+ premiumUser={premiumUser}
/>
</TabPanel>
diff --git a/ui/litellm-dashboard/src/components/regenerate_key_modal.tsx b/ui/litellm-dashboard/src/components/regenerate_key_modal.tsx
index d526b9e6d2e..84a406d2fcf 100644
--- a/ui/litellm-dashboard/src/components/regenerate_key_modal.tsx
+++ b/ui/litellm-dashboard/src/components/regenerate_key_modal.tsx
@@ -11,6 +11,7 @@ interface RegenerateKeyModalProps {
visible: boolean;
onClose: () => void;
accessToken: string | null;
+ premiumUser: boolean;
}
export function RegenerateKeyModal({
@@ -18,6 +19,7 @@ export function RegenerateKeyModal({
visible,
onClose,
accessToken,
+ premiumUser,
}: RegenerateKeyModalProps) {
const [form] = Form.useForm();
const [regeneratedKey, setRegeneratedKey] = useState<string | null>(null);
diff --git a/ui/litellm-dashboard/src/components/top_key_view.tsx b/ui/litellm-dashboard/src/components/top_key_view.tsx
index 643cea0a6d0..023fac9b6f4 100644
--- a/ui/litellm-dashboard/src/components/top_key_view.tsx
+++ b/ui/litellm-dashboard/src/components/top_key_view.tsx
@@ -13,6 +13,7 @@ interface TopKeyViewProps {
userID: string | null;
userRole: string | null;
teams: any[] | null;
+ premiumUser: boolean;
}
const TopKeyView: React.FC<TopKeyViewProps> = ({
@@ -20,7 +21,8 @@ const TopKeyView: React.FC<TopKeyViewProps> = ({
accessToken,
userID,
userRole,
- teams
+ teams,
+ premiumUser
}) => {
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
const [selectedKey, setSelectedKey] = useState<string | null>(null);
@@ -193,6 +195,7 @@ const TopKeyView: React.FC<TopKeyViewProps> = ({
userID={userID}
userRole={userRole}
teams={teams}
+ premiumUser={premiumUser}
/>
</div>
</div>
diff --git a/ui/litellm-dashboard/src/components/usage.tsx b/ui/litellm-dashboard/src/components/usage.tsx
index 385e9386021..6779ba7f94f 100644
--- a/ui/litellm-dashboard/src/components/usage.tsx
+++ b/ui/litellm-dashboard/src/components/usage.tsx
@@ -660,6 +660,7 @@ const UsagePage: React.FC<UsagePageProps> = ({
userID={userID}
userRole={userRole}
teams={null}
+ premiumUser={premiumUser}
/>
</Card>
</Col>
diff --git a/ui/litellm-dashboard/src/components/view_key_table.tsx b/ui/litellm-dashboard/src/components/view_key_table.tsx
index c1efc2f15c0..2faed3a81f7 100644
--- a/ui/litellm-dashboard/src/components/view_key_table.tsx
+++ b/ui/litellm-dashboard/src/components/view_key_table.tsx
@@ -393,6 +393,7 @@ const ViewKeyTable: React.FC<ViewKeyTableProps> = ({
refresh={refresh}
selectedKeyAlias={selectedKeyAlias}
setSelectedKeyAlias={setSelectedKeyAlias}
+ premiumUser={premiumUser}
/>
{isDeleteModalOpen && (
diff --git a/ui/litellm-dashboard/src/components/view_logs/index.tsx b/ui/litellm-dashboard/src/components/view_logs/index.tsx
index bb0d2a223a7..c6654a0b229 100644
--- a/ui/litellm-dashboard/src/components/view_logs/index.tsx
+++ b/ui/litellm-dashboard/src/components/view_logs/index.tsx
@@ -471,7 +471,7 @@ export default function SpendLogsTable({
</h1>
</div>
{selectedKeyInfo && selectedKeyIdInfoView && selectedKeyInfo.api_key === selectedKeyIdInfoView ? (
- <KeyInfoView keyId={selectedKeyIdInfoView} keyData={selectedKeyInfo} accessToken={accessToken} userID={userID} userRole={userRole} teams={allTeams} onClose={() => setSelectedKeyIdInfoView(null)} />
+ <KeyInfoView keyId={selectedKeyIdInfoView} keyData={selectedKeyInfo} accessToken={accessToken} userID={userID} userRole={userRole} teams={allTeams} onClose={() => setSelectedKeyIdInfoView(null)} premiumUser={premiumUser}/>
) : selectedSessionId ? (
<div className="bg-white rounded-lg shadow">
<DataTable