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]

removed unused imports

Achintya Rajan73eafed51c89
diff --git a/ui/litellm-dashboard/.eslintrc.json b/ui/litellm-dashboard/.eslintrc.json
index d40bc426c5f..90edda434cc 100644
--- a/ui/litellm-dashboard/.eslintrc.json
+++ b/ui/litellm-dashboard/.eslintrc.json
@@ -1,7 +1,17 @@
{
- "extends": "next/core-web-vitals",
+ "extends": ["next/core-web-vitals", "eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
"plugins": ["unused-imports"],
"rules": {
- "unused-imports/no-unused-imports": "error"
+ "unused-imports/no-unused-imports": "error",
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-unused-vars": "off",
+ "@typescript-eslint/no-unused-expressions": "off",
+ "@typescript-eslint/ban-ts-comment": "off",
+ "prefer-const": "off",
+ "no-empty": "off",
+ "no-prototype-builtins": "off",
+ "no-useless-catch": "off",
+ "no-useless-escape": "off",
+ "no-self-assign": "off"
}
}
diff --git a/ui/litellm-dashboard/package-lock.json b/ui/litellm-dashboard/package-lock.json
index 7d3155fe33b..5e85b773534 100644
--- a/ui/litellm-dashboard/package-lock.json
+++ b/ui/litellm-dashboard/package-lock.json
@@ -56,6 +56,7 @@
"autoprefixer": "^10.4.17",
"eslint": "^8",
"eslint-config-next": "14.2.32",
+ "eslint-config-prettier": "^10.1.8",
"eslint-plugin-unused-imports": "^4.2.0",
"jsdom": "^27.0.0",
"postcss": "^8.4.33",
@@ -10461,6 +10462,21 @@
}
}
},
+ "node_modules/eslint-config-prettier": {
+ "version": "10.1.8",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz",
+ "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==",
+ "dev": true,
+ "bin": {
+ "eslint-config-prettier": "bin/cli.js"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint-config-prettier"
+ },
+ "peerDependencies": {
+ "eslint": ">=7.0.0"
+ }
+ },
"node_modules/eslint-import-resolver-node": {
"version": "0.3.9",
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz",
diff --git a/ui/litellm-dashboard/package.json b/ui/litellm-dashboard/package.json
index 5cf476efcb6..5578a9f2f39 100644
--- a/ui/litellm-dashboard/package.json
+++ b/ui/litellm-dashboard/package.json
@@ -61,6 +61,7 @@
"autoprefixer": "^10.4.17",
"eslint": "^8",
"eslint-config-next": "14.2.32",
+ "eslint-config-prettier": "^10.1.8",
"eslint-plugin-unused-imports": "^4.2.0",
"jsdom": "^27.0.0",
"postcss": "^8.4.33",
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/settings/admin-settings/page.tsx b/ui/litellm-dashboard/src/app/(dashboard)/settings/admin-settings/page.tsx
index c99242f0c3c..be2551f670f 100644
--- a/ui/litellm-dashboard/src/app/(dashboard)/settings/admin-settings/page.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/settings/admin-settings/page.tsx
@@ -3,7 +3,6 @@
import AdminPanel from "@/components/admins";
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
import { useState } from "react";
-import { Team } from "@/components/key_team_helpers/key_list";
import useTeams from "@/app/(dashboard)/hooks/useTeams";
const AdminSettings = () => {
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/virtual-keys/page.tsx b/ui/litellm-dashboard/src/app/(dashboard)/virtual-keys/page.tsx
index 56f780b2962..856f552e931 100644
--- a/ui/litellm-dashboard/src/app/(dashboard)/virtual-keys/page.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/virtual-keys/page.tsx
@@ -1,7 +1,7 @@
"use client";
import { useState } from "react";
-import useKeyList, { KeyResponse } from "@/components/key_team_helpers/key_list";
+import useKeyList from "@/components/key_team_helpers/key_list";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
import UserDashboard from "@/components/user_dashboard";
diff --git a/ui/litellm-dashboard/src/app/model_hub/page.tsx b/ui/litellm-dashboard/src/app/model_hub/page.tsx
index 265fe485ec4..d42f8576eb6 100644
--- a/ui/litellm-dashboard/src/app/model_hub/page.tsx
+++ b/ui/litellm-dashboard/src/app/model_hub/page.tsx
@@ -1,7 +1,6 @@
"use client";
-import React, { Suspense, useEffect, useState } from "react";
+import React, { useEffect, useState } from "react";
import { useSearchParams } from "next/navigation";
-import { modelHubCall } from "@/components/networking";
import PublicModelHubPage from "@/components/public_model_hub";
export default function PublicModelHub() {
diff --git a/ui/litellm-dashboard/src/app/model_hub_table/page.tsx b/ui/litellm-dashboard/src/app/model_hub_table/page.tsx
index d10f11d61bf..fb83f28fc1b 100644
--- a/ui/litellm-dashboard/src/app/model_hub_table/page.tsx
+++ b/ui/litellm-dashboard/src/app/model_hub_table/page.tsx
@@ -1,7 +1,6 @@
"use client";
-import React, { Suspense, useEffect, useState } from "react";
+import React, { useEffect, useState } from "react";
import { useSearchParams } from "next/navigation";
-import { modelHubCall } from "@/components/networking";
import ModelHubTable from "@/components/model_hub_table";
export default function PublicModelHubTable() {
diff --git a/ui/litellm-dashboard/src/app/onboarding/page.tsx b/ui/litellm-dashboard/src/app/onboarding/page.tsx
index f37d69f7989..b748446ca98 100644
--- a/ui/litellm-dashboard/src/app/onboarding/page.tsx
+++ b/ui/litellm-dashboard/src/app/onboarding/page.tsx
@@ -1,18 +1,16 @@
"use client";
-import React, { Suspense, useEffect, useState } from "react";
+import React, { useEffect, useState } from "react";
import { useSearchParams } from "next/navigation";
import { Card, Title, Text, TextInput, Callout, Button, Grid, Col } from "@tremor/react";
-import { RiAlarmWarningLine, RiCheckboxCircleLine } from "@remixicon/react";
+import { RiCheckboxCircleLine } from "@remixicon/react";
import {
- invitationClaimCall,
- userUpdateUserCall,
getOnboardingCredentials,
claimOnboardingToken,
getUiConfig,
getProxyBaseUrl,
} from "@/components/networking";
import { jwtDecode } from "jwt-decode";
-import { Form, Button as Button2, message } from "antd";
+import { Form, Button as Button2 } from "antd";
import { getCookie } from "@/utils/cookieUtils";
export default function Onboarding() {
diff --git a/ui/litellm-dashboard/src/components/SCIM.tsx b/ui/litellm-dashboard/src/components/SCIM.tsx
index 5ccfecaf197..c8da8f2c9c7 100644
--- a/ui/litellm-dashboard/src/components/SCIM.tsx
+++ b/ui/litellm-dashboard/src/components/SCIM.tsx
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from "react";
-import { Card, Title, Text, Grid, Col, Button as TremorButton, Callout, TextInput, Divider } from "@tremor/react";
-import { message, Form } from "antd";
+import { Card, Title, Text, Grid, Button as TremorButton, Callout, TextInput, Divider } from "@tremor/react";
+import { Form } from "antd";
import { keyCreateCall } from "./networking";
import { CopyToClipboard } from "react-copy-to-clipboard";
import {
diff --git a/ui/litellm-dashboard/src/components/SSOModals.tsx b/ui/litellm-dashboard/src/components/SSOModals.tsx
index 44b09dc4db0..3c484214980 100644
--- a/ui/litellm-dashboard/src/components/SSOModals.tsx
+++ b/ui/litellm-dashboard/src/components/SSOModals.tsx
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from "react";
-import { Modal, Form, Input, Button as Button2, Select, message } from "antd";
+import { Modal, Form, Input, Button as Button2, Select } from "antd";
import { Text, TextInput } from "@tremor/react";
import { getSSOSettings, updateSSOSettings } from "./networking";
import NotificationsManager from "./molecules/notifications_manager";
diff --git a/ui/litellm-dashboard/src/components/SSOSettings.tsx b/ui/litellm-dashboard/src/components/SSOSettings.tsx
index 399fd51706f..917aa1864e7 100644
--- a/ui/litellm-dashboard/src/components/SSOSettings.tsx
+++ b/ui/litellm-dashboard/src/components/SSOSettings.tsx
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from "react";
import { Card, Title, Text, Divider, Button, TextInput } from "@tremor/react";
-import { Typography, Spin, message, Switch, Select, Form, InputNumber } from "antd";
+import { Typography, Spin, Switch, Select, InputNumber } from "antd";
import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
import { getInternalUserSettings, updateInternalUserSettings, modelAvailableCall } from "./networking";
import BudgetDurationDropdown, { getBudgetDurationLabel } from "./common_components/budget_duration_dropdown";
diff --git a/ui/litellm-dashboard/src/components/TeamSSOSettings.tsx b/ui/litellm-dashboard/src/components/TeamSSOSettings.tsx
index 4d20630e9f6..1c4d7f62400 100644
--- a/ui/litellm-dashboard/src/components/TeamSSOSettings.tsx
+++ b/ui/litellm-dashboard/src/components/TeamSSOSettings.tsx
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from "react";
import { Card, Title, Text, Divider, Button, TextInput } from "@tremor/react";
-import { Typography, Spin, message, Switch, Select, Form } from "antd";
+import { Typography, Spin, Switch, Select } from "antd";
import { getDefaultTeamSettings, updateDefaultTeamSettings, modelAvailableCall } from "./networking";
import BudgetDurationDropdown, { getBudgetDurationLabel } from "./common_components/budget_duration_dropdown";
import { getModelDisplayName } from "./key_team_helpers/fetch_available_models_team_key";
diff --git a/ui/litellm-dashboard/src/components/UIAccessControlForm.tsx b/ui/litellm-dashboard/src/components/UIAccessControlForm.tsx
index dacae9e9fcf..77bee2c1e52 100644
--- a/ui/litellm-dashboard/src/components/UIAccessControlForm.tsx
+++ b/ui/litellm-dashboard/src/components/UIAccessControlForm.tsx
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from "react";
-import { Form, Button as Button2, Select, message } from "antd";
+import { Form, Button as Button2, Select } from "antd";
import { Text, TextInput } from "@tremor/react";
import { getSSOSettings, updateSSOSettings } from "./networking";
import NotificationManager from "./molecules/notifications_manager";
diff --git a/ui/litellm-dashboard/src/components/add_fallbacks.tsx b/ui/litellm-dashboard/src/components/add_fallbacks.tsx
index a07337400d7..b89ce34df57 100644
--- a/ui/litellm-dashboard/src/components/add_fallbacks.tsx
+++ b/ui/litellm-dashboard/src/components/add_fallbacks.tsx
@@ -3,10 +3,10 @@
*/
import React, { useState, useEffect } from "react";
-import { Button, TextInput, Grid, Col } from "@tremor/react";
-import { Select, SelectItem, MultiSelect, MultiSelectItem, SearchSelect, SearchSelectItem } from "@tremor/react";
+import { Button } from "@tremor/react";
+import { SearchSelect, SearchSelectItem } from "@tremor/react";
import { setCallbacksCall } from "./networking";
-import { Modal, Form, message } from "antd";
+import { Modal, Form } from "antd";
import { fetchAvailableModels, ModelGroup } from "./chat_ui/llm_calls/fetch_models";
import NotificationManager from "./molecules/notifications_manager";
diff --git a/ui/litellm-dashboard/src/components/add_model/add_auto_router_tab.tsx b/ui/litellm-dashboard/src/components/add_model/add_auto_router_tab.tsx
index 8c4a2c69a0a..ac3a0cf7a38 100644
--- a/ui/litellm-dashboard/src/components/add_model/add_auto_router_tab.tsx
+++ b/ui/litellm-dashboard/src/components/add_model/add_auto_router_tab.tsx
@@ -1,11 +1,8 @@
import React, { useEffect, useState } from "react";
-import { Card, Form, Button, Tooltip, Typography, Select as AntdSelect, Modal, Upload, message } from "antd";
+import { Card, Form, Button, Tooltip, Typography, Select as AntdSelect, Modal } from "antd";
import type { FormInstance } from "antd";
-import type { UploadProps } from "antd/es/upload";
-import { UploadOutlined } from "@ant-design/icons";
import { Text, TextInput } from "@tremor/react";
-import { Row, Col } from "antd";
-import { CredentialItem, modelAvailableCall } from "../networking";
+import { modelAvailableCall } from "../networking";
import ConnectionErrorDisplay from "./model_connection_test";
import { all_admin_roles } from "@/utils/roles";
import { handleAddAutoRouterSubmit } from "./handle_add_auto_router_submit";
diff --git a/ui/litellm-dashboard/src/components/add_model/add_model_tab.tsx b/ui/litellm-dashboard/src/components/add_model/add_model_tab.tsx
index 139f1cc7a9f..26c5e5c3ff6 100644
--- a/ui/litellm-dashboard/src/components/add_model/add_model_tab.tsx
+++ b/ui/litellm-dashboard/src/components/add_model/add_model_tab.tsx
@@ -1,5 +1,5 @@
-import React, { useEffect, useMemo, useState } from "react";
-import { Card, Form, Button, Tooltip, Typography, Select as AntdSelect, Modal, message } from "antd";
+import React, { useEffect, useState } from "react";
+import { Card, Form, Button, Tooltip, Typography, Select as AntdSelect, Modal } from "antd";
import type { FormInstance } from "antd";
import type { UploadProps } from "antd/es/upload";
import { TabGroup, TabList, Tab, TabPanels, TabPanel } from "@tremor/react";
@@ -7,13 +7,13 @@ import LiteLLMModelNameField from "./litellm_model_name";
import ConditionalPublicModelName from "./conditional_public_model_name";
import ProviderSpecificFields from "./provider_specific_fields";
import AdvancedSettings from "./advanced_settings";
-import { Providers, providerLogoMap, getPlaceholder } from "../provider_info_helpers";
+import { Providers, providerLogoMap } from "../provider_info_helpers";
import type { Team } from "../key_team_helpers/key_list";
import { CredentialItem, getGuardrailsList, modelAvailableCall } from "../networking";
import ConnectionErrorDisplay from "./model_connection_test";
import { TEST_MODES } from "./add_model_modes";
import { Row, Col } from "antd";
-import { Text, TextInput, Switch } from "@tremor/react";
+import { Text, Switch } from "@tremor/react";
import TeamDropdown from "../common_components/team_dropdown";
import { all_admin_roles } from "@/utils/roles";
import AddAutoRouterTab from "./add_auto_router_tab";
diff --git a/ui/litellm-dashboard/src/components/add_model/advanced_settings.tsx b/ui/litellm-dashboard/src/components/add_model/advanced_settings.tsx
index 7bed5df1cc9..e77dc55f75d 100644
--- a/ui/litellm-dashboard/src/components/add_model/advanced_settings.tsx
+++ b/ui/litellm-dashboard/src/components/add_model/advanced_settings.tsx
@@ -1,11 +1,10 @@
import React from "react";
-import { Form, Switch, Select, Input, Tooltip } from "antd";
-import { Text, Button, Accordion, AccordionHeader, AccordionBody, TextInput } from "@tremor/react";
-import { Row, Col, Typography, Card } from "antd";
+import { Form, Switch, Select, Tooltip } from "antd";
+import { Text, Accordion, AccordionHeader, AccordionBody, TextInput } from "@tremor/react";
+import { Row, Col, Typography } from "antd";
import TextArea from "antd/es/input/TextArea";
import { InfoCircleOutlined } from "@ant-design/icons";
import { Team } from "../key_team_helpers/key_list";
-import TeamDropdown from "../common_components/team_dropdown";
import CacheControlSettings from "./cache_control_settings";
const { Link } = Typography;
diff --git a/ui/litellm-dashboard/src/components/add_model/cache_control_settings.tsx b/ui/litellm-dashboard/src/components/add_model/cache_control_settings.tsx
index e892dfb391b..88fd9a42921 100644
--- a/ui/litellm-dashboard/src/components/add_model/cache_control_settings.tsx
+++ b/ui/litellm-dashboard/src/components/add_model/cache_control_settings.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import { Form, Switch, Select, Input, Typography } from "antd";
+import { Form, Switch, Select, Typography } from "antd";
import { PlusOutlined, MinusCircleOutlined } from "@ant-design/icons";
import NumericalInput from "../shared/numerical_input";
diff --git a/ui/litellm-dashboard/src/components/add_model/handle_add_auto_router_submit.tsx b/ui/litellm-dashboard/src/components/add_model/handle_add_auto_router_submit.tsx
index ff4793f15ac..f813f2f0b77 100644
--- a/ui/litellm-dashboard/src/components/add_model/handle_add_auto_router_submit.tsx
+++ b/ui/litellm-dashboard/src/components/add_model/handle_add_auto_router_submit.tsx
@@ -1,4 +1,3 @@
-import { message } from "antd";
import { modelCreateCall, Model } from "../networking";
import NotificationManager from "../molecules/notifications_manager";
diff --git a/ui/litellm-dashboard/src/components/add_model/handle_add_model_submit.tsx b/ui/litellm-dashboard/src/components/add_model/handle_add_model_submit.tsx
index 88b5d9f1a32..e41b114c777 100644
--- a/ui/litellm-dashboard/src/components/add_model/handle_add_model_submit.tsx
+++ b/ui/litellm-dashboard/src/components/add_model/handle_add_model_submit.tsx
@@ -1,8 +1,5 @@
-import { message } from "antd";
import { provider_map, Providers } from "../provider_info_helpers";
import { modelCreateCall, Model } from "../networking";
-import React, { useState } from "react";
-import ConnectionErrorDisplay from "./model_connection_test";
import NotificationManager from "../molecules/notifications_manager";
export const prepareModelAddRequest = async (formValues: Record<string, any>, accessToken: string, form: any) => {
diff --git a/ui/litellm-dashboard/src/components/add_model/model_connection_test.tsx b/ui/litellm-dashboard/src/components/add_model/model_connection_test.tsx
index 2e0967fb0aa..932285bac35 100644
--- a/ui/litellm-dashboard/src/components/add_model/model_connection_test.tsx
+++ b/ui/litellm-dashboard/src/components/add_model/model_connection_test.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import { Typography, Space, Button, Divider, message } from "antd";
+import { Typography, Button, Divider } from "antd";
import { WarningOutlined, InfoCircleOutlined, CopyOutlined } from "@ant-design/icons";
import { testConnectionRequest } from "../networking";
import { prepareModelAddRequest } from "./handle_add_model_submit";
diff --git a/ui/litellm-dashboard/src/components/add_model/router_config_builder.tsx b/ui/litellm-dashboard/src/components/add_model/router_config_builder.tsx
index a74853cc9bc..727a052b055 100644
--- a/ui/litellm-dashboard/src/components/add_model/router_config_builder.tsx
+++ b/ui/litellm-dashboard/src/components/add_model/router_config_builder.tsx
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from "react";
-import { Card, Form, Button, Input, InputNumber, Select as AntdSelect, Space, Tooltip, Collapse } from "antd";
+import { Card, Button, Input, InputNumber, Select as AntdSelect, Tooltip, Collapse } from "antd";
import { PlusOutlined, DeleteOutlined, InfoCircleOutlined, DownOutlined } from "@ant-design/icons";
-import { Text, TextInput } from "@tremor/react";
+import { Text } from "@tremor/react";
import { ModelGroup } from "../chat_ui/llm_calls/fetch_models";
const { TextArea } = Input;
diff --git a/ui/litellm-dashboard/src/components/add_pass_through.tsx b/ui/litellm-dashboard/src/components/add_pass_through.tsx
index ae20e897cea..7d4bcc4ab79 100644
--- a/ui/litellm-dashboard/src/components/add_pass_through.tsx
+++ b/ui/litellm-dashboard/src/components/add_pass_through.tsx
@@ -2,46 +2,26 @@
* Modal to add fallbacks to the proxy router config
*/
-import React, { useState, useEffect, useRef } from "react";
-import { Button, TextInput, Grid, Col, Switch } from "@tremor/react";
+import React, { useState } from "react";
+import { Button, TextInput, Switch } from "@tremor/react";
import {
- Select,
- SelectItem,
- MultiSelect,
- MultiSelectItem,
Card,
- Metric,
- Text,
Title,
Subtitle,
- Accordion,
- AccordionHeader,
- AccordionBody,
} from "@tremor/react";
import { createPassThroughEndpoint } from "./networking";
import {
- Button as Button2,
Modal,
Form,
- Input,
- InputNumber,
Select as Select2,
- message,
Tooltip,
Alert,
- Divider,
- Collapse,
} from "antd";
import NumericalInput from "./shared/numerical_input";
import {
InfoCircleOutlined,
ApiOutlined,
- ExclamationCircleOutlined,
- CheckCircleOutlined,
- CopyOutlined,
} from "@ant-design/icons";
-import { keyCreateCall, slackBudgetAlertsHealthCheck, modelAvailableCall } from "./networking";
-import { list } from "postcss";
import KeyValueInput from "./key_value_input";
import { passThroughItem } from "./pass_through_settings";
import RoutePreview from "./route_preview";
diff --git a/ui/litellm-dashboard/src/components/admins.tsx b/ui/litellm-dashboard/src/components/admins.tsx
index 88ec208cb4d..84d3d791ec8 100644
--- a/ui/litellm-dashboard/src/components/admins.tsx
+++ b/ui/litellm-dashboard/src/components/admins.tsx
@@ -5,9 +5,8 @@
import React, { useState, useEffect } from "react";
import { Typography } from "antd";
import { useRouter } from "next/navigation";
-import { Button as Button2, Modal, Form, Input, Select as Select2, InputNumber, message } from "antd";
-import { CopyToClipboard } from "react-copy-to-clipboard";
-import { Select, SelectItem, Subtitle } from "@tremor/react";
+import { Button as Button2, Modal, Form, Input } from "antd";
+import { Select, SelectItem } from "@tremor/react";
import { Team } from "./key_team_helpers/key_list";
import {
Table,
@@ -17,24 +16,16 @@ import {
TableHeaderCell,
TableRow,
Card,
- Icon,
Button,
- Col,
- Text,
- Grid,
Callout,
- Divider,
TabGroup,
TabList,
Tab,
TabPanel,
TabPanels,
} from "@tremor/react";
-import { PencilAltIcon } from "@heroicons/react/outline";
-import OnboardingModal from "./onboarding_link";
import { InvitationLink } from "./onboarding_link";
import SSOModals from "./SSOModals";
-import { ssoProviderConfigs } from "./SSOModals";
import SCIMConfig from "./SCIM";
import UIAccessControlForm from "./UIAccessControlForm";
import NotificationsManager from "./molecules/notifications_manager";
diff --git a/ui/litellm-dashboard/src/components/alerting/alerting_settings.tsx b/ui/litellm-dashboard/src/components/alerting/alerting_settings.tsx
index 2348b651d77..aa02b4c59a5 100644
--- a/ui/litellm-dashboard/src/components/alerting/alerting_settings.tsx
+++ b/ui/litellm-dashboard/src/components/alerting/alerting_settings.tsx
@@ -2,21 +2,9 @@
* UI for controlling slack alerting settings
*/
import React, { useState, useEffect } from "react";
-import {
- Table,
- TableHead,
- TableRow,
- TableHeaderCell,
- TableCell,
- Button,
- Icon,
- Badge,
- TableBody,
- Text,
-} from "@tremor/react";
-import { InputNumber, message } from "antd";
+
+
import { alertingSettingsCall, updateConfigFieldSetting } from "../networking";
-import { TrashIcon, CheckCircleIcon } from "@heroicons/react/outline";
import DynamicForm from "./dynamic_form";
import NotificationsManager from "../molecules/notifications_manager";
interface alertingSettingsItem {
diff --git a/ui/litellm-dashboard/src/components/alerting/dynamic_form.tsx b/ui/litellm-dashboard/src/components/alerting/dynamic_form.tsx
index fff4f760ed0..a0c7586ce4f 100644
--- a/ui/litellm-dashboard/src/components/alerting/dynamic_form.tsx
+++ b/ui/litellm-dashboard/src/components/alerting/dynamic_form.tsx
@@ -1,8 +1,7 @@
import React from "react";
-import { Form, Input, InputNumber, Row, Col, Button as Button2 } from "antd";
+import { Form, Input, InputNumber, Button as Button2 } from "antd";
import { TrashIcon, CheckCircleIcon } from "@heroicons/react/outline";
import { Button, Badge, Icon, Text, TableRow, TableCell, Switch } from "@tremor/react";
-import Paragraph from "antd/es/typography/Paragraph";
interface AlertingSetting {
field_name: string;
field_description: string;
diff --git a/ui/litellm-dashboard/src/components/all_keys_table.tsx b/ui/litellm-dashboard/src/components/all_keys_table.tsx
index 33908834c63..a915fe06179 100644
--- a/ui/litellm-dashboard/src/components/all_keys_table.tsx
+++ b/ui/litellm-dashboard/src/components/all_keys_table.tsx
@@ -1,7 +1,6 @@
"use client";
-import React, { useEffect, useState, useCallback, useRef } from "react";
-import { ColumnDef, Row } from "@tanstack/react-table";
-import { DataTable } from "./view_logs/table";
+import React, { useEffect, useState } from "react";
+import { ColumnDef } from "@tanstack/react-table";
import { Select, SelectItem } from "@tremor/react";
import { Button } from "@tremor/react";
import KeyInfoView from "./templates/key_info_view";
@@ -9,16 +8,10 @@ import { Tooltip } from "antd";
import { Team, KeyResponse } from "./key_team_helpers/key_list";
import FilterComponent from "./molecules/filter";
import { FilterOption } from "./molecules/filter";
-import { keyListCall, Organization, userListCall } from "./networking";
-import { createTeamSearchFunction } from "./key_team_helpers/team_search_fn";
-import { createOrgSearchFunction } from "./key_team_helpers/organization_search_fn";
+import { Organization, userListCall } from "./networking";
import { useFilterLogic } from "./key_team_helpers/filter_logic";
import { Setter } from "@/types";
import { updateExistingKeys } from "@/utils/dataUtils";
-import { debounce } from "lodash";
-import { defaultPageSize } from "./constants";
-import { fetchAllTeams } from "./key_team_helpers/filter_helpers";
-import { fetchAllOrganizations } from "./key_team_helpers/filter_helpers";
import { flexRender, getCoreRowModel, getSortedRowModel, SortingState, useReactTable } from "@tanstack/react-table";
import { Table, TableHead, TableHeaderCell, TableBody, TableRow, TableCell, Icon } from "@tremor/react";
import { SwitchVerticalIcon, ChevronUpIcon, ChevronDownIcon, ChevronRightIcon } from "@heroicons/react/outline";
diff --git a/ui/litellm-dashboard/src/components/api_ref.tsx b/ui/litellm-dashboard/src/components/api_ref.tsx
index 81baccc4cb8..8876c414c0b 100644
--- a/ui/litellm-dashboard/src/components/api_ref.tsx
+++ b/ui/litellm-dashboard/src/components/api_ref.tsx
@@ -1,23 +1,7 @@
"use client";
-import React, { useEffect, useState } from "react";
+import React from "react";
import {
- Badge,
- Card,
- Table,
- Metric,
- TableBody,
- TableCell,
- TableHead,
- TableHeaderCell,
- TableRow,
Text,
- Title,
- Icon,
- Accordion,
- AccordionBody,
- AccordionHeader,
- List,
- ListItem,
Tab,
TabGroup,
TabList,
@@ -25,8 +9,6 @@ import {
TabPanels,
Grid,
} from "@tremor/react";
-import { Statistic } from "antd";
-import { modelAvailableCall } from "./networking";
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
interface ApiRefProps {
diff --git a/ui/litellm-dashboard/src/components/budgets/budget_modal.tsx b/ui/litellm-dashboard/src/components/budgets/budget_modal.tsx
index 6ce1c01c847..3afac21aae1 100644
--- a/ui/litellm-dashboard/src/components/budgets/budget_modal.tsx
+++ b/ui/litellm-dashboard/src/components/budgets/budget_modal.tsx
@@ -1,6 +1,6 @@
import React from "react";
-import { Button, TextInput, Grid, Col, Accordion, AccordionHeader, AccordionBody } from "@tremor/react";
-import { Button as Button2, Modal, Form, Input, InputNumber, Select, message } from "antd";
+import { TextInput, Accordion, AccordionHeader, AccordionBody } from "@tremor/react";
+import { Button as Button2, Modal, Form, InputNumber, Select } from "antd";
import { budgetCreateCall } from "../networking";
import NotificationsManager from "../molecules/notifications_manager";
diff --git a/ui/litellm-dashboard/src/components/budgets/budget_panel.tsx b/ui/litellm-dashboard/src/components/budgets/budget_panel.tsx
index efe14235e01..aa96b32554f 100644
--- a/ui/litellm-dashboard/src/components/budgets/budget_panel.tsx
+++ b/ui/litellm-dashboard/src/components/budgets/budget_panel.tsx
@@ -4,14 +4,12 @@
*/
import React, { useState, useEffect } from "react";
-import BudgetSettings from "./budget_settings";
import BudgetModal from "./budget_modal";
import EditBudgetModal from "./edit_budget_modal";
import {
Table,
TableBody,
TableCell,
- TableFoot,
TableHead,
TableHeaderCell,
TableRow,
@@ -24,18 +22,10 @@ import {
TabList,
TabPanel,
TabPanels,
- Grid,
} from "@tremor/react";
import {
- InformationCircleIcon,
PencilAltIcon,
- PencilIcon,
- StatusOnlineIcon,
TrashIcon,
- RefreshIcon,
- CheckCircleIcon,
- XCircleIcon,
- QuestionMarkCircleIcon,
} from "@heroicons/react/outline";
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
import { getBudgetList, budgetDeleteCall } from "../networking";
diff --git a/ui/litellm-dashboard/src/components/budgets/budget_settings.tsx b/ui/litellm-dashboard/src/components/budgets/budget_settings.tsx
index 1d53e02121c..eb8c5c0f333 100644
--- a/ui/litellm-dashboard/src/components/budgets/budget_settings.tsx
+++ b/ui/litellm-dashboard/src/components/budgets/budget_settings.tsx
@@ -1,45 +1,21 @@
import React, { useState, useEffect } from "react";
import {
Card,
- Title,
- Subtitle,
Table,
TableHead,
TableRow,
- Badge,
TableHeaderCell,
TableCell,
TableBody,
- Metric,
Text,
- Grid,
Button,
- TextInput,
- Select as Select2,
- SelectItem,
- Col,
- Accordion,
- AccordionBody,
- AccordionHeader,
- AccordionList,
} from "@tremor/react";
-import { TabPanel, TabPanels, TabGroup, TabList, Tab, Icon } from "@tremor/react";
+import { Icon } from "@tremor/react";
import { getBudgetSettings } from "../networking";
-import { Modal, Form, Input, Select, Button as Button2, message, InputNumber } from "antd";
+import { InputNumber } from "antd";
import {
- InformationCircleIcon,
- PencilAltIcon,
- PencilIcon,
- StatusOnlineIcon,
TrashIcon,
- RefreshIcon,
- CheckCircleIcon,
- XCircleIcon,
- QuestionMarkCircleIcon,
} from "@heroicons/react/outline";
-import AddFallbacks from "../add_fallbacks";
-import openai from "openai";
-import Paragraph from "antd/es/skeleton/Paragraph";
interface BudgetSettingsPageProps {
accessToken: string | null;
diff --git a/ui/litellm-dashboard/src/components/budgets/edit_budget_modal.tsx b/ui/litellm-dashboard/src/components/budgets/edit_budget_modal.tsx
index d229148c662..a186c67dd8b 100644
--- a/ui/litellm-dashboard/src/components/budgets/edit_budget_modal.tsx
+++ b/ui/litellm-dashboard/src/components/budgets/edit_budget_modal.tsx
@@ -1,6 +1,6 @@
import React, { useEffect } from "react";
-import { Button, TextInput, Grid, Col, Accordion, AccordionHeader, AccordionBody } from "@tremor/react";
-import { Button as Button2, Modal, Form, Input, InputNumber, Select, message } from "antd";
+import { TextInput, Accordion, AccordionHeader, AccordionBody } from "@tremor/react";
+import { Button as Button2, Modal, Form, InputNumber, Select } from "antd";
import { budgetUpdateCall } from "../networking";
import { budgetItem } from "./budget_panel";
import NotificationsManager from "../molecules/notifications_manager";
diff --git a/ui/litellm-dashboard/src/components/bulk_create_users_button.tsx b/ui/litellm-dashboard/src/components/bulk_create_users_button.tsx
index bf789a42ad5..981683cf541 100644
--- a/ui/litellm-dashboard/src/components/bulk_create_users_button.tsx
+++ b/ui/litellm-dashboard/src/components/bulk_create_users_button.tsx
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from "react";
import { Button as TremorButton, Text } from "@tremor/react";
-import { Modal, Table, Upload, message, Alert, Typography } from "antd";
+import { Modal, Table, Upload, Typography } from "antd";
import {
UploadOutlined,
DownloadOutlined,
@@ -13,7 +13,6 @@ import { userCreateCall, invitationCreateCall, getProxyUISettings } from "./netw
import Papa from "papaparse";
import { CheckCircleIcon, XCircleIcon, ExclamationIcon } from "@heroicons/react/outline";
import { CopyToClipboard } from "react-copy-to-clipboard";
-import { InvitationLink } from "./onboarding_link";
import NotificationsManager from "./molecules/notifications_manager";
interface BulkCreateUsersProps {
diff --git a/ui/litellm-dashboard/src/components/bulk_edit_user.tsx b/ui/litellm-dashboard/src/components/bulk_edit_user.tsx
index 4e3f7df95db..b3847911cc0 100644
--- a/ui/litellm-dashboard/src/components/bulk_edit_user.tsx
+++ b/ui/litellm-dashboard/src/components/bulk_edit_user.tsx
@@ -1,19 +1,16 @@
import React, { useState } from "react";
import {
- Button as Button2,
Modal,
Typography,
Divider,
message,
Table,
Select,
- Form,
InputNumber,
Card,
Space,
Checkbox,
} from "antd";
-import { Button } from "@tremor/react";
import { userBulkUpdateUserCall, teamBulkMemberAddCall, Member } from "./networking";
import { UserEditView } from "./user_edit_view";
import NotificationsManager from "./molecules/notifications_manager";
diff --git a/ui/litellm-dashboard/src/components/cache_dashboard.tsx b/ui/litellm-dashboard/src/components/cache_dashboard.tsx
index afb506e8aea..1713e4b0462 100644
--- a/ui/litellm-dashboard/src/components/cache_dashboard.tsx
+++ b/ui/litellm-dashboard/src/components/cache_dashboard.tsx
@@ -1,33 +1,26 @@
import React, { useState, useEffect } from "react";
import {
Card,
- Title,
BarChart,
Subtitle,
Grid,
Col,
- Select,
- SelectItem,
- DateRangePicker,
DateRangePickerValue,
MultiSelect,
MultiSelectItem,
- Button,
TabPanel,
TabPanels,
TabGroup,
TabList,
Tab,
- TextInput,
Icon,
Text,
} from "@tremor/react";
import UsageDatePicker from "./shared/usage_date_picker";
import NotificationsManager from "./molecules/notifications_manager";
-import { Button as Button2, message } from "antd";
-import { RefreshIcon, CheckCircleIcon, XCircleIcon } from "@heroicons/react/outline";
-import { adminGlobalCacheActivity, cachingHealthCheckCall, healthCheckCall } from "./networking";
+import { RefreshIcon } from "@heroicons/react/outline";
+import { adminGlobalCacheActivity, cachingHealthCheckCall } from "./networking";
// Import the new component
import { CacheHealthTab } from "./cache_health";
diff --git a/ui/litellm-dashboard/src/components/cache_health.tsx b/ui/litellm-dashboard/src/components/cache_health.tsx
index f07e7cddb64..92bbc14846f 100644
--- a/ui/litellm-dashboard/src/components/cache_health.tsx
+++ b/ui/litellm-dashboard/src/components/cache_health.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import { Card, Text, Button, TabGroup, TabList, Tab, TabPanel, TabPanels } from "@tremor/react";
+import { Text, Button, TabGroup, TabList, Tab, TabPanel, TabPanels } from "@tremor/react";
import { CheckCircleIcon, XCircleIcon, ClipboardCopyIcon } from "@heroicons/react/outline";
import { ResponseTimeIndicator } from "./response_time_indicator";
diff --git a/ui/litellm-dashboard/src/components/chat_ui/ChatImageUpload.tsx b/ui/litellm-dashboard/src/components/chat_ui/ChatImageUpload.tsx
index a4e1a44f750..55527d997ac 100644
--- a/ui/litellm-dashboard/src/components/chat_ui/ChatImageUpload.tsx
+++ b/ui/litellm-dashboard/src/components/chat_ui/ChatImageUpload.tsx
@@ -1,6 +1,6 @@
import React from "react";
import { Upload, Tooltip } from "antd";
-import { PaperClipOutlined, DeleteOutlined } from "@ant-design/icons";
+import { PaperClipOutlined } from "@ant-design/icons";
const { Dragger } = Upload;
diff --git a/ui/litellm-dashboard/src/components/chat_ui/ChatUI.tsx b/ui/litellm-dashboard/src/components/chat_ui/ChatUI.tsx
index b596ad6c6c2..ab288c36983 100644
--- a/ui/litellm-dashboard/src/components/chat_ui/ChatUI.tsx
+++ b/ui/litellm-dashboard/src/components/chat_ui/ChatUI.tsx
@@ -3,28 +3,13 @@ import ReactMarkdown from "react-markdown";
import {
Card,
Title,
- Table,
- TableHead,
- TableRow,
- TableCell,
- TableBody,
- Grid,
- Tab,
- TabGroup,
- TabList,
- TabPanel,
- TabPanels,
- Metric,
- Col,
Text,
- SelectItem,
TextInput,
Button as TremorButton,
- Divider,
} from "@tremor/react";
import { v4 as uuidv4 } from "uuid";
-import { message, Select, Spin, Typography, Tooltip, Input, Upload, Modal, Button } from "antd";
+import { Select, Spin, Typography, Tooltip, Input, Upload, Modal, Button } from "antd";
import { makeOpenAIChatCompletionRequest } from "./llm_calls/chat_completion";
import { makeOpenAIImageGenerationRequest } from "./llm_calls/image_generation";
import { makeOpenAIImageEditsRequest } from "./llm_calls/image_edits";
@@ -33,28 +18,26 @@ import { makeAnthropicMessagesRequest } from "./llm_calls/anthropic_messages";
import { fetchAvailableModels, ModelGroup } from "./llm_calls/fetch_models";
import { fetchAvailableMCPTools } from "./llm_calls/fetch_mcp_tools";
import type { MCPTool } from "./llm_calls/fetch_mcp_tools";
-import { litellmModeMapping, ModelMode, EndpointType, getEndpointType } from "./mode_endpoint_mapping";
+import { EndpointType } from "./mode_endpoint_mapping";
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
import { coy } from "react-syntax-highlighter/dist/esm/styles/prism";
import EndpointSelector from "./EndpointSelector";
import TagSelector from "../tag_management/TagSelector";
import VectorStoreSelector from "../vector_store_management/VectorStoreSelector";
import GuardrailSelector from "../guardrails/GuardrailSelector";
-import { determineEndpointType } from "./EndpointUtils";
import { generateCodeSnippet } from "./CodeSnippets";
import { MessageType } from "./types";
import ReasoningContent from "./ReasoningContent";
import ResponseMetrics, { TokenUsage } from "./ResponseMetrics";
import ResponsesImageUpload from "./ResponsesImageUpload";
import ResponsesImageRenderer from "./ResponsesImageRenderer";
-import { convertImageToBase64, createMultimodalMessage, createDisplayMessage } from "./ResponsesImageUtils";
+import { createMultimodalMessage, createDisplayMessage } from "./ResponsesImageUtils";
import ChatImageUpload from "./ChatImageUpload";
import ChatImageRenderer from "./ChatImageRenderer";
import { createChatMultimodalMessage, createChatDisplayMessage } from "./ChatImageUtils";
import SessionManagement from "./SessionManagement";
import MCPEventsDisplay, { MCPEvent } from "./MCPEventsDisplay";
import {
- SendOutlined,
ApiOutlined,
KeyOutlined,
ClearOutlined,
@@ -66,7 +49,6 @@ import {
DatabaseOutlined,
InfoCircleOutlined,
SafetyOutlined,
- UploadOutlined,
PictureOutlined,
CodeOutlined,
ToolOutlined,
diff --git a/ui/litellm-dashboard/src/components/chat_ui/EndpointUtils.tsx b/ui/litellm-dashboard/src/components/chat_ui/EndpointUtils.tsx
index 1645bceab1f..c1f26e01b4a 100644
--- a/ui/litellm-dashboard/src/components/chat_ui/EndpointUtils.tsx
+++ b/ui/litellm-dashboard/src/components/chat_ui/EndpointUtils.tsx
@@ -1,5 +1,5 @@
import { ModelGroup } from "./llm_calls/fetch_models";
-import { ModelMode, EndpointType, getEndpointType } from "./mode_endpoint_mapping";
+import { EndpointType, getEndpointType } from "./mode_endpoint_mapping";
/**
* Determines the appropriate endpoint type based on the selected model
diff --git a/ui/litellm-dashboard/src/components/chat_ui/ReasoningContent.tsx b/ui/litellm-dashboard/src/components/chat_ui/ReasoningContent.tsx
index ee438b6b09d..133569cc2ed 100644
--- a/ui/litellm-dashboard/src/components/chat_ui/ReasoningContent.tsx
+++ b/ui/litellm-dashboard/src/components/chat_ui/ReasoningContent.tsx
@@ -1,5 +1,5 @@
import React, { useState } from "react";
-import { Button, Collapse } from "antd";
+import { Button } from "antd";
import ReactMarkdown from "react-markdown";
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
import { coy } from "react-syntax-highlighter/dist/esm/styles/prism";
diff --git a/ui/litellm-dashboard/src/components/chat_ui/ResponseMetrics.tsx b/ui/litellm-dashboard/src/components/chat_ui/ResponseMetrics.tsx
index 335208dbcad..fc83aa06593 100644
--- a/ui/litellm-dashboard/src/components/chat_ui/ResponseMetrics.tsx
+++ b/ui/litellm-dashboard/src/components/chat_ui/ResponseMetrics.tsx
@@ -5,7 +5,6 @@ import {
NumberOutlined,
ImportOutlined,
ExportOutlined,
- ThunderboltOutlined,
BulbOutlined,
ToolOutlined,
} from "@ant-design/icons";
diff --git a/ui/litellm-dashboard/src/components/chat_ui/ResponsesImageUpload.tsx b/ui/litellm-dashboard/src/components/chat_ui/ResponsesImageUpload.tsx
index 345e7ad75c8..d5abf13a7d3 100644
--- a/ui/litellm-dashboard/src/components/chat_ui/ResponsesImageUpload.tsx
+++ b/ui/litellm-dashboard/src/components/chat_ui/ResponsesImageUpload.tsx
@@ -1,6 +1,6 @@
import React from "react";
import { Upload, Tooltip } from "antd";
-import { PaperClipOutlined, DeleteOutlined } from "@ant-design/icons";
+import { PaperClipOutlined } from "@ant-design/icons";
const { Dragger } = Upload;
diff --git a/ui/litellm-dashboard/src/components/chat_ui/SessionManagement.tsx b/ui/litellm-dashboard/src/components/chat_ui/SessionManagement.tsx
index 88dcb98b220..3b65d974c80 100644
--- a/ui/litellm-dashboard/src/components/chat_ui/SessionManagement.tsx
+++ b/ui/litellm-dashboard/src/components/chat_ui/SessionManagement.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import { Switch, Tooltip, message } from "antd";
+import { Switch, Tooltip } from "antd";
import { InfoCircleOutlined, CopyOutlined } from "@ant-design/icons";
import { EndpointType } from "./mode_endpoint_mapping";
import NotificationsManager from "../molecules/notifications_manager";
diff --git a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/anthropic_messages.tsx b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/anthropic_messages.tsx
index 73107d2472f..a300425d8f8 100644
--- a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/anthropic_messages.tsx
+++ b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/anthropic_messages.tsx
@@ -1,4 +1,3 @@
-import { message } from "antd";
import Anthropic from "@anthropic-ai/sdk";
import { MessageType } from "../types";
import { TokenUsage } from "../ResponseMetrics";
diff --git a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/chat_completion.tsx b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/chat_completion.tsx
index 646c0ab9ad5..44aea48986b 100644
--- a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/chat_completion.tsx
+++ b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/chat_completion.tsx
@@ -1,6 +1,5 @@
import openai from "openai";
import { ChatCompletionMessageParam } from "openai/resources/chat/completions";
-import { message } from "antd";
import { TokenUsage } from "../ResponseMetrics";
import { getProxyBaseUrl } from "@/components/networking";
diff --git a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/fetch_mcp_tools.tsx b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/fetch_mcp_tools.tsx
index 4c8f953d871..d89ecbfb481 100644
--- a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/fetch_mcp_tools.tsx
+++ b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/fetch_mcp_tools.tsx
@@ -1,6 +1,4 @@
-import NotificationManager from "@/components/molecules/notifications_manager";
import { mcpToolsCall } from "../../networking";
-import { message } from "antd";
export interface MCPTool {
name: string;
diff --git a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/image_edits.tsx b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/image_edits.tsx
index 5b309a296ad..504798ae8b2 100644
--- a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/image_edits.tsx
+++ b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/image_edits.tsx
@@ -1,5 +1,4 @@
import openai from "openai";
-import { message } from "antd";
import { getProxyBaseUrl } from "@/components/networking";
import NotificationManager from "@/components/molecules/notifications_manager";
diff --git a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/image_generation.tsx b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/image_generation.tsx
index d8c650bd712..4eb8ea1b551 100644
--- a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/image_generation.tsx
+++ b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/image_generation.tsx
@@ -1,5 +1,4 @@
import openai from "openai";
-import { message } from "antd";
import { getProxyBaseUrl } from "@/components/networking";
import NotificationManager from "@/components/molecules/notifications_manager";
diff --git a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/responses_api.tsx b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/responses_api.tsx
index e77c78b380e..0b1366feebe 100644
--- a/ui/litellm-dashboard/src/components/chat_ui/llm_calls/responses_api.tsx
+++ b/ui/litellm-dashboard/src/components/chat_ui/llm_calls/responses_api.tsx
@@ -1,9 +1,7 @@
import openai from "openai";
-import { message } from "antd";
import { MessageType } from "../types";
import { TokenUsage } from "../ResponseMetrics";
import { getProxyBaseUrl } from "@/components/networking";
-import { MCPTool } from "@/components/chat_ui/llm_calls/fetch_mcp_tools";
import NotificationManager from "@/components/molecules/notifications_manager";
import { MCPEvent } from "../MCPEventsDisplay";
diff --git a/ui/litellm-dashboard/src/components/cloudzero_export_modal.tsx b/ui/litellm-dashboard/src/components/cloudzero_export_modal.tsx
index 9bcde05bce0..575cb0b89bc 100644
--- a/ui/litellm-dashboard/src/components/cloudzero_export_modal.tsx
+++ b/ui/litellm-dashboard/src/components/cloudzero_export_modal.tsx
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from "react";
-import { Card, Title, Text, Button, Callout, TextInput } from "@tremor/react";
-import { Modal, Form, Input, message, Spin, Select } from "antd";
+import { Text, Button, Callout, TextInput } from "@tremor/react";
+import { Modal, Form, Spin, Select } from "antd";
import NotificationsManager from "./molecules/notifications_manager";
interface CloudZeroExportModalProps {
diff --git a/ui/litellm-dashboard/src/components/common_components/AutoRotationView.tsx b/ui/litellm-dashboard/src/components/common_components/AutoRotationView.tsx
index 937d1f9d4cc..d6445d1472d 100644
--- a/ui/litellm-dashboard/src/components/common_components/AutoRotationView.tsx
+++ b/ui/litellm-dashboard/src/components/common_components/AutoRotationView.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import { Card, Text, Badge } from "@tremor/react";
+import { Text, Badge } from "@tremor/react";
import { RefreshIcon, ClockIcon } from "@heroicons/react/outline";
interface AutoRotationViewProps {
diff --git a/ui/litellm-dashboard/src/components/common_components/ModelAliasManager.tsx b/ui/litellm-dashboard/src/components/common_components/ModelAliasManager.tsx
index d1fc6f6b1b2..b4b1fa779c6 100644
--- a/ui/litellm-dashboard/src/components/common_components/ModelAliasManager.tsx
+++ b/ui/litellm-dashboard/src/components/common_components/ModelAliasManager.tsx
@@ -1,5 +1,4 @@
import React, { useState, useEffect } from "react";
-import { message } from "antd";
import { PlusCircleIcon, PencilIcon, TrashIcon } from "@heroicons/react/outline";
import { Card, Title, Text, Table, TableHead, TableHeaderCell, TableBody, TableRow, TableCell } from "@tremor/react";
import ModelSelector from "./ModelSelector";
diff --git a/ui/litellm-dashboard/src/components/dashboard_default_team.tsx b/ui/litellm-dashboard/src/components/dashboard_default_team.tsx
index da8986bc820..36805b8912a 100644
--- a/ui/litellm-dashboard/src/components/dashboard_default_team.tsx
+++ b/ui/litellm-dashboard/src/components/dashboard_default_team.tsx
@@ -4,7 +4,7 @@ import { ProxySettings, UserInfo } from "./user_dashboard";
import { getProxyUISettings } from "./networking";
interface DashboardTeamProps {
- teams: Object[] | null;
+ teams: object[] | null;
setSelectedTeam: React.Dispatch<React.SetStateAction<any | null>>;
userRole: string | null;
proxySettings: ProxySettings | null;
@@ -17,7 +17,7 @@ interface DashboardTeamProps {
type TeamInterface = {
models: any[];
team_id: null;
- team_alias: String;
+ team_alias: string;
max_budget: number | null;
};
diff --git a/ui/litellm-dashboard/src/components/general_settings.tsx b/ui/litellm-dashboard/src/components/general_settings.tsx
index 1661b231aee..f7a6781d362 100644
--- a/ui/litellm-dashboard/src/components/general_settings.tsx
+++ b/ui/litellm-dashboard/src/components/general_settings.tsx
@@ -488,7 +488,7 @@ const GeneralSettings: React.FC<GeneralSettingsPageProps> = ({ accessToken, user
<TableBody>
{routerSettings["fallbacks"] &&
- routerSettings["fallbacks"].map((item: Object, index: number) =>
+ routerSettings["fallbacks"].map((item: object, index: number) =>
Object.entries(item).map(([key, value]) => (
<TableRow key={index.toString() + key}>
<TableCell>{key}</TableCell>
diff --git a/ui/litellm-dashboard/src/components/key_team_helpers/filter_helpers.ts b/ui/litellm-dashboard/src/components/key_team_helpers/filter_helpers.ts
index 14bf95f3246..fa12a75aacd 100644
--- a/ui/litellm-dashboard/src/components/key_team_helpers/filter_helpers.ts
+++ b/ui/litellm-dashboard/src/components/key_team_helpers/filter_helpers.ts
@@ -11,7 +11,7 @@ export const fetchAllKeyAliases = async (accessToken: string | null): Promise<st
if (!accessToken) return [];
try {
- const { aliases } = await keyAliasesCall(accessToken as unknown as String);
+ const { aliases } = await keyAliasesCall(accessToken as unknown as string);
// Defensive dedupe & null-guard
return Array.from(new Set((aliases || []).filter(Boolean)));
} catch (error) {
diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsx
index e7d88b38d96..fd479b99ab7 100644
--- a/ui/litellm-dashboard/src/components/networking.tsx
+++ b/ui/litellm-dashboard/src/components/networking.tsx
@@ -80,8 +80,8 @@ export const DEFAULT_ORGANIZATION = "default_organization";
export interface Model {
model_name: string;
- litellm_params: Object;
- model_info: Object | null;
+ litellm_params: object;
+ model_info: object | null;
}
interface PromptInfo {
@@ -90,7 +90,7 @@ interface PromptInfo {
export interface PromptSpec {
prompt_id: string;
- litellm_params: Object;
+ litellm_params: object;
prompt_info: PromptInfo;
created_at?: string;
updated_at?: string;
@@ -381,7 +381,7 @@ export const modelCreateCall = async (accessToken: string, formValues: Model) =>
}
};
-export const modelSettingsCall = async (accessToken: String) => {
+export const modelSettingsCall = async (accessToken: string) => {
/**
* Get all configurable params for setting a model
*/
@@ -625,7 +625,7 @@ export const invitationClaimCall = async (
}
};
-export const alertingSettingsCall = async (accessToken: String) => {
+export const alertingSettingsCall = async (accessToken: string) => {
/**
* Get all configurable params for setting a model
*/
@@ -848,7 +848,7 @@ export const userCreateCall = async (
}
};
-export const keyDeleteCall = async (accessToken: String, user_key: String) => {
+export const keyDeleteCall = async (accessToken: string, user_key: string) => {
try {
const url = proxyBaseUrl ? `${proxyBaseUrl}/key/delete` : `/key/delete`;
console.log("in keyDeleteCall:", user_key);
@@ -915,7 +915,7 @@ export const userDeleteCall = async (accessToken: string, userIds: string[]) =>
}
};
-export const teamDeleteCall = async (accessToken: String, teamID: String) => {
+export const teamDeleteCall = async (accessToken: string, teamID: string) => {
try {
const url = proxyBaseUrl ? `${proxyBaseUrl}/team/delete` : `/team/delete`;
console.log("in teamDeleteCall:", teamID);
@@ -956,7 +956,7 @@ export type UserListResponse = {
};
export const userListCall = async (
- accessToken: String,
+ accessToken: string,
userIDs: string[] | null = null,
page: number | null = null,
page_size: number | null = null,
@@ -1044,10 +1044,10 @@ export const userListCall = async (
};
export const userInfoCall = async (
- accessToken: String,
- userID: String | null,
- userRole: String,
- viewAll: Boolean = false,
+ accessToken: string,
+ userID: string | null,
+ userRole: string,
+ viewAll: boolean = false,
page: number | null,
page_size: number | null,
lookup_user_id: boolean = false,
@@ -1098,7 +1098,7 @@ export const userInfoCall = async (
}
};
-export const teamInfoCall = async (accessToken: String, teamID: String | null) => {
+export const teamInfoCall = async (accessToken: string, teamID: string | null) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/team/info` : `/team/info`;
if (teamID) {
@@ -1139,9 +1139,9 @@ type TeamListResponse = {
};
export const v2TeamListCall = async (
- accessToken: String,
+ accessToken: string,
organizationID: string | null,
- userID: String | null = null,
+ userID: string | null = null,
teamID: string | null = null,
team_alias: string | null = null,
page: number = 1,
@@ -1204,9 +1204,9 @@ export const v2TeamListCall = async (
};
export const teamListCall = async (
- accessToken: String,
+ accessToken: string,
organizationID: string | null,
- userID: String | null = null,
+ userID: string | null = null,
teamID: string | null = null,
team_alias: string | null = null,
) => {
@@ -1264,7 +1264,7 @@ export const teamListCall = async (
}
};
-export const availableTeamListCall = async (accessToken: String) => {
+export const availableTeamListCall = async (accessToken: string) => {
/**
* Get all available teams on proxy
*/
@@ -1294,7 +1294,7 @@ export const availableTeamListCall = async (accessToken: String) => {
}
};
-export const organizationListCall = async (accessToken: String) => {
+export const organizationListCall = async (accessToken: string) => {
/**
* Get all organizations on proxy
*/
@@ -1323,7 +1323,7 @@ export const organizationListCall = async (accessToken: String) => {
}
};
-export const organizationInfoCall = async (accessToken: String, organizationID: String) => {
+export const organizationInfoCall = async (accessToken: string, organizationID: string) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/organization/info` : `/organization/info`;
if (organizationID) {
@@ -1466,7 +1466,7 @@ export const organizationDeleteCall = async (accessToken: string, organizationID
}
};
-export const transformRequestCall = async (accessToken: String, request: object) => {
+export const transformRequestCall = async (accessToken: string, request: object) => {
/**
* Transform request
*/
@@ -1498,7 +1498,7 @@ export const transformRequestCall = async (accessToken: String, request: object)
}
};
-export const userDailyActivityCall = async (accessToken: String, startTime: Date, endTime: Date, page: number = 1) => {
+export const userDailyActivityCall = async (accessToken: string, startTime: Date, endTime: Date, page: number = 1) => {
/**
* Get daily user activity on proxy
*/
@@ -1538,7 +1538,7 @@ export const userDailyActivityCall = async (accessToken: String, startTime: Date
};
export const tagDailyActivityCall = async (
- accessToken: String,
+ accessToken: string,
startTime: Date,
endTime: Date,
page: number = 1,
@@ -1586,7 +1586,7 @@ export const tagDailyActivityCall = async (
};
export const teamDailyActivityCall = async (
- accessToken: String,
+ accessToken: string,
startTime: Date,
endTime: Date,
page: number = 1,
@@ -1634,7 +1634,7 @@ export const teamDailyActivityCall = async (
}
};
-export const getTotalSpendCall = async (accessToken: String) => {
+export const getTotalSpendCall = async (accessToken: string) => {
/**
* Get all models on proxy
*/
@@ -1666,7 +1666,7 @@ export const getTotalSpendCall = async (accessToken: String) => {
}
};
-export const getOnboardingCredentials = async (inviteUUID: String) => {
+export const getOnboardingCredentials = async (inviteUUID: string) => {
/**
* Get all models on proxy
*/
@@ -1701,7 +1701,7 @@ export const claimOnboardingToken = async (
accessToken: string,
inviteUUID: string,
userID: string,
- password: String,
+ password: string,
) => {
const url = proxyBaseUrl ? `${proxyBaseUrl}/onboarding/claim_token` : `/onboarding/claim_token`;
try {
@@ -1769,7 +1769,7 @@ export const regenerateKeyCall = async (accessToken: string, keyToRegenerate: st
let ModelListerrorShown = false;
let errorTimer: NodeJS.Timeout | null = null;
-export const modelInfoCall = async (accessToken: String, userID: String, userRole: String) => {
+export const modelInfoCall = async (accessToken: string, userID: string, userRole: string) => {
/**
* Get all models on proxy
*/
@@ -1821,7 +1821,7 @@ export const modelInfoCall = async (accessToken: String, userID: String, userRol
}
};
-export const modelInfoV1Call = async (accessToken: String, modelId: String) => {
+export const modelInfoV1Call = async (accessToken: string, modelId: string) => {
/**
* Get all models on proxy
*/
@@ -1864,7 +1864,7 @@ export const modelHubPublicModelsCall = async () => {
return response.json();
};
-export const modelHubCall = async (accessToken: String) => {
+export const modelHubCall = async (accessToken: string) => {
/**
* Get all models on proxy
*/
@@ -1899,7 +1899,7 @@ export const modelHubCall = async (accessToken: String) => {
};
// Function to get allowed IPs
-export const getAllowedIPs = async (accessToken: String) => {
+export const getAllowedIPs = async (accessToken: string) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/get/allowed_ips` : `/get/allowed_ips`;
@@ -1928,7 +1928,7 @@ export const getAllowedIPs = async (accessToken: String) => {
};
// Function to add an allowed IP
-export const addAllowedIP = async (accessToken: String, ip: String) => {
+export const addAllowedIP = async (accessToken: string, ip: string) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/add/allowed_ip` : `/add/allowed_ip`;
@@ -1958,7 +1958,7 @@ export const addAllowedIP = async (accessToken: String, ip: String) => {
};
// Function to delete an allowed IP
-export const deleteAllowedIP = async (accessToken: String, ip: String) => {
+export const deleteAllowedIP = async (accessToken: string, ip: string) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/delete/allowed_ip` : `/delete/allowed_ip`;
@@ -1988,14 +1988,14 @@ export const deleteAllowedIP = async (accessToken: String, ip: String) => {
};
export const modelMetricsCall = async (
- accessToken: String,
- userID: String,
- userRole: String,
- modelGroup: String | null,
- startTime: String | undefined,
- endTime: String | undefined,
- apiKey: String | null,
- customer: String | null,
+ accessToken: string,
+ userID: string,
+ userRole: string,
+ modelGroup: string | null,
+ startTime: string | undefined,
+ endTime: string | undefined,
+ apiKey: string | null,
+ customer: string | null,
) => {
/**
* Get all models on proxy
@@ -2031,10 +2031,10 @@ export const modelMetricsCall = async (
}
};
export const streamingModelMetricsCall = async (
- accessToken: String,
- modelGroup: String | null,
- startTime: String | undefined,
- endTime: String | undefined,
+ accessToken: string,
+ modelGroup: string | null,
+ startTime: string | undefined,
+ endTime: string | undefined,
) => {
/**
* Get all models on proxy
@@ -2071,14 +2071,14 @@ export const streamingModelMetricsCall = async (
};
export const modelMetricsSlowResponsesCall = async (
- accessToken: String,
- userID: String,
- userRole: String,
- modelGroup: String | null,
- startTime: String | undefined,
- endTime: String | undefined,
- apiKey: String | null,
- customer: String | null,
+ accessToken: string,
+ userID: string,
+ userRole: string,
+ modelGroup: string | null,
+ startTime: string | undefined,
+ endTime: string | undefined,
+ apiKey: string | null,
+ customer: string | null,
) => {
/**
* Get all models on proxy
@@ -2116,14 +2116,14 @@ export const modelMetricsSlowResponsesCall = async (
};
export const modelExceptionsCall = async (
- accessToken: String,
- userID: String,
- userRole: String,
- modelGroup: String | null,
- startTime: String | undefined,
- endTime: String | undefined,
- apiKey: String | null,
- customer: String | null,
+ accessToken: string,
+ userID: string,
+ userRole: string,
+ modelGroup: string | null,
+ startTime: string | undefined,
+ endTime: string | undefined,
+ apiKey: string | null,
+ customer: string | null,
) => {
/**
* Get all models on proxy
@@ -2159,7 +2159,7 @@ export const modelExceptionsCall = async (
}
};
-export const updateUsefulLinksCall = async (accessToken: String, useful_links: Record<string, string>) => {
+export const updateUsefulLinksCall = async (accessToken: string, useful_links: Record<string, string>) => {
try {
const url = proxyBaseUrl ? `${proxyBaseUrl}/model_hub/update_useful_links` : `/model_hub/update_useful_links`;
const response = await fetch(url, {
@@ -2185,11 +2185,11 @@ export const updateUsefulLinksCall = async (accessToken: String, useful_links: R
};
export const modelAvailableCall = async (
- accessToken: String,
- userID: String,
- userRole: String,
+ accessToken: string,
+ userID: string,
+ userRole: string,
return_wildcard_routes: boolean = false,
- teamID: String | null = null,
+ teamID: string | null = null,
include_model_access_groups: boolean = false,
only_model_access_groups: boolean = false,
) => {
@@ -2240,7 +2240,7 @@ export const modelAvailableCall = async (
}
};
-export const keySpendLogsCall = async (accessToken: String, token: String) => {
+export const keySpendLogsCall = async (accessToken: string, token: string) => {
try {
const url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/logs` : `/global/spend/logs`;
console.log("in keySpendLogsCall:", url);
@@ -2267,7 +2267,7 @@ export const keySpendLogsCall = async (accessToken: String, token: String) => {
}
};
-export const teamSpendLogsCall = async (accessToken: String) => {
+export const teamSpendLogsCall = async (accessToken: string) => {
try {
const url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/teams` : `/global/spend/teams`;
console.log("in teamSpendLogsCall:", url);
@@ -2295,10 +2295,10 @@ export const teamSpendLogsCall = async (accessToken: String) => {
};
export const tagsSpendLogsCall = async (
- accessToken: String,
- startTime: String | undefined,
- endTime: String | undefined,
- tags: String[] | undefined,
+ accessToken: string,
+ startTime: string | undefined,
+ endTime: string | undefined,
+ tags: string[] | undefined,
) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/tags` : `/global/spend/tags`;
@@ -2336,7 +2336,7 @@ export const tagsSpendLogsCall = async (
}
};
-export const allTagNamesCall = async (accessToken: String) => {
+export const allTagNamesCall = async (accessToken: string) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/all_tag_names` : `/global/spend/all_tag_names`;
@@ -2364,7 +2364,7 @@ export const allTagNamesCall = async (accessToken: String) => {
}
};
-export const allEndUsersCall = async (accessToken: String) => {
+export const allEndUsersCall = async (accessToken: string) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/customer/list` : `/customer/list`;
@@ -2392,7 +2392,7 @@ export const allEndUsersCall = async (accessToken: String) => {
}
};
-export const userFilterUICall = async (accessToken: String, params: URLSearchParams) => {
+export const userFilterUICall = async (accessToken: string, params: URLSearchParams) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/user/filter/ui` : `/user/filter/ui`;
@@ -2425,12 +2425,12 @@ export const userFilterUICall = async (accessToken: String, params: URLSearchPar
};
export const userSpendLogsCall = async (
- accessToken: String,
- token: String,
- userRole: String,
- userID: String,
- startTime: String,
- endTime: String,
+ accessToken: string,
+ token: string,
+ userRole: string,
+ userID: string,
+ startTime: string,
+ endTime: string,
) => {
try {
console.log(`user role in spend logs call: ${userRole}`);
@@ -2466,7 +2466,7 @@ export const userSpendLogsCall = async (
};
export const uiSpendLogsCall = async (
- accessToken: String,
+ accessToken: string,
api_key?: string,
team_id?: string,
request_id?: string,
@@ -2528,7 +2528,7 @@ export const uiSpendLogsCall = async (
}
};
-export const adminSpendLogsCall = async (accessToken: String) => {
+export const adminSpendLogsCall = async (accessToken: string) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/logs` : `/global/spend/logs`;
@@ -2557,7 +2557,7 @@ export const adminSpendLogsCall = async (accessToken: String) => {
}
};
-export const adminTopKeysCall = async (accessToken: String) => {
+export const adminTopKeysCall = async (accessToken: string) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/keys?limit=5` : `/global/spend/keys?limit=5`;
@@ -2587,10 +2587,10 @@ export const adminTopKeysCall = async (accessToken: String) => {
};
export const adminTopEndUsersCall = async (
- accessToken: String,
- keyToken: String | null,
- startTime: String | undefined,
- endTime: String | undefined,
+ accessToken: string,
+ keyToken: string | null,
+ startTime: string | undefined,
+ endTime: string | undefined,
) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/end_users` : `/global/spend/end_users`;
@@ -2637,10 +2637,10 @@ export const adminTopEndUsersCall = async (
};
export const adminspendByProvider = async (
- accessToken: String,
- keyToken: String | null,
- startTime: String | undefined,
- endTime: String | undefined,
+ accessToken: string,
+ keyToken: string | null,
+ startTime: string | undefined,
+ endTime: string | undefined,
) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/provider` : `/global/spend/provider`;
@@ -2679,9 +2679,9 @@ export const adminspendByProvider = async (
};
export const adminGlobalActivity = async (
- accessToken: String,
- startTime: String | undefined,
- endTime: String | undefined,
+ accessToken: string,
+ startTime: string | undefined,
+ endTime: string | undefined,
) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/activity` : `/global/activity`;
@@ -2716,9 +2716,9 @@ export const adminGlobalActivity = async (
};
export const adminGlobalCacheActivity = async (
- accessToken: String,
- startTime: String | undefined,
- endTime: String | undefined,
+ accessToken: string,
+ startTime: string | undefined,
+ endTime: string | undefined,
) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/activity/cache_hits` : `/global/activity/cache_hits`;
@@ -2753,9 +2753,9 @@ export const adminGlobalCacheActivity = async (
};
export const adminGlobalActivityPerModel = async (
- accessToken: String,
- startTime: String | undefined,
- endTime: String | undefined,
+ accessToken: string,
+ startTime: string | undefined,
+ endTime: string | undefined,
) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/activity/model` : `/global/activity/model`;
@@ -2790,10 +2790,10 @@ export const adminGlobalActivityPerModel = async (
};
export const adminGlobalActivityExceptions = async (
- accessToken: String,
- startTime: String | undefined,
- endTime: String | undefined,
- modelGroup: String,
+ accessToken: string,
+ startTime: string | undefined,
+ endTime: string | undefined,
+ modelGroup: string,
) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/activity/exceptions` : `/global/activity/exceptions`;
@@ -2832,10 +2832,10 @@ export const adminGlobalActivityExceptions = async (
};
export const adminGlobalActivityExceptionsPerDeployment = async (
- accessToken: String,
- startTime: String | undefined,
- endTime: String | undefined,
- modelGroup: String,
+ accessToken: string,
+ startTime: string | undefined,
+ endTime: string | undefined,
+ modelGroup: string,
) => {
try {
let url = proxyBaseUrl
@@ -2875,7 +2875,7 @@ export const adminGlobalActivityExceptionsPerDeployment = async (
}
};
-export const adminTopModelsCall = async (accessToken: String) => {
+export const adminTopModelsCall = async (accessToken: string) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/models?limit=5` : `/global/spend/models?limit=5`;
@@ -2904,7 +2904,7 @@ export const adminTopModelsCall = async (accessToken: String) => {
}
};
-export const keyInfoCall = async (accessToken: String, keys: String[]) => {
+export const keyInfoCall = async (accessToken: string, keys: string[]) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/v2/key/info` : `/v2/key/info`;
@@ -3029,7 +3029,7 @@ export const keyInfoV1Call = async (accessToken: string, key: string) => {
};
export const keyListCall = async (
- accessToken: String,
+ accessToken: string,
organizationID: string | null,
teamID: string | null,
selectedKeyAlias: string | null,
@@ -3117,7 +3117,7 @@ export const keyListCall = async (
}
};
-export const keyAliasesCall = async (accessToken: String): Promise<{ aliases: string[] }> => {
+export const keyAliasesCall = async (accessToken: string): Promise<{ aliases: string[] }> => {
/**
* Get all key aliases from proxy
*/
@@ -3149,7 +3149,7 @@ export const keyAliasesCall = async (accessToken: String): Promise<{ aliases: st
}
};
-export const spendUsersCall = async (accessToken: String, userID: String) => {
+export const spendUsersCall = async (accessToken: string, userID: string) => {
try {
const url = proxyBaseUrl ? `${proxyBaseUrl}/spend/users` : `/spend/users`;
console.log("in spendUsersCall:", url);
@@ -3177,10 +3177,10 @@ export const spendUsersCall = async (accessToken: String, userID: String) => {
};
export const userRequestModelCall = async (
- accessToken: String,
- model: String,
- UserID: String,
- justification: String,
+ accessToken: string,
+ model: string,
+ UserID: string,
+ justification: string,
) => {
try {
const url = proxyBaseUrl ? `${proxyBaseUrl}/user/request_model` : `/user/request_model`;
@@ -3215,7 +3215,7 @@ export const userRequestModelCall = async (
}
};
-export const userGetRequesedtModelsCall = async (accessToken: String) => {
+export const userGetRequesedtModelsCall = async (accessToken: string) => {
try {
const url = proxyBaseUrl ? `${proxyBaseUrl}/user/get_requests` : `/user/get_requests`;
console.log("in userGetRequesedtModelsCall:", url);
@@ -3252,7 +3252,7 @@ export interface User {
[key: string]: string; // Include any other potential keys in the dictionary
}
-export const userDailyActivityAggregatedCall = async (accessToken: String, startTime: Date, endTime: Date) => {
+export const userDailyActivityAggregatedCall = async (accessToken: string, startTime: Date, endTime: Date) => {
/**
* Get aggregated daily user activity (no pagination)
*/
@@ -3296,7 +3296,7 @@ export const userDailyActivityAggregatedCall = async (accessToken: String, start
}
};
-export const userGetAllUsersCall = async (accessToken: String, role: String) => {
+export const userGetAllUsersCall = async (accessToken: string, role: string) => {
try {
const url = proxyBaseUrl ? `${proxyBaseUrl}/user/get_users?role=${role}` : `/user/get_users?role=${role}`;
console.log("in userGetAllUsersCall:", url);
@@ -3326,7 +3326,7 @@ export const userGetAllUsersCall = async (accessToken: String, role: String) =>
}
};
-export const getPossibleUserRoles = async (accessToken: String) => {
+export const getPossibleUserRoles = async (accessToken: string) => {
try {
const url = proxyBaseUrl ? `${proxyBaseUrl}/user/available_roles` : `/user/available_roles`;
const response = await fetch(url, {
@@ -3443,7 +3443,7 @@ export const credentialCreateCall = async (
}
};
-export const credentialListCall = async (accessToken: String) => {
+export const credentialListCall = async (accessToken: string) => {
/**
* Get all available teams on proxy
*/
@@ -3476,7 +3476,7 @@ export const credentialListCall = async (accessToken: String) => {
}
};
-export const credentialGetCall = async (accessToken: String, credentialName: String | null, modelId: String | null) => {
+export const credentialGetCall = async (accessToken: string, credentialName: string | null, modelId: string | null) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/credentials` : `/credentials`;
@@ -3513,7 +3513,7 @@ export const credentialGetCall = async (accessToken: String, credentialName: Str
}
};
-export const credentialDeleteCall = async (accessToken: String, credentialName: String) => {
+export const credentialDeleteCall = async (accessToken: string, credentialName: string) => {
try {
const url = proxyBaseUrl ? `${proxyBaseUrl}/credentials/${credentialName}` : `/credentials/${credentialName}`;
console.log("in credentialDeleteCall:", credentialName);
@@ -4243,7 +4243,7 @@ export const PredictedSpendLogsCall = async (accessToken: string, requestData: a
}
};
-export const slackBudgetAlertsHealthCheck = async (accessToken: String) => {
+export const slackBudgetAlertsHealthCheck = async (accessToken: string) => {
try {
let url = proxyBaseUrl
? `${proxyBaseUrl}/health/services?service=slack_budget_alerts`
@@ -4280,7 +4280,7 @@ export const slackBudgetAlertsHealthCheck = async (accessToken: String) => {
}
};
-export const serviceHealthCheck = async (accessToken: String, service: String) => {
+export const serviceHealthCheck = async (accessToken: string, service: string) => {
try {
let url = proxyBaseUrl
? `${proxyBaseUrl}/health/services?service=${service}`
@@ -4312,7 +4312,7 @@ export const serviceHealthCheck = async (accessToken: String, service: String) =
}
};
-export const getBudgetList = async (accessToken: String) => {
+export const getBudgetList = async (accessToken: string) => {
/**
* Get all configurable params for setting a budget
*/
@@ -4344,7 +4344,7 @@ export const getBudgetList = async (accessToken: String) => {
throw error;
}
};
-export const getBudgetSettings = async (accessToken: String) => {
+export const getBudgetSettings = async (accessToken: string) => {
/**
* Get all configurable params for setting a budget
*/
@@ -4377,7 +4377,7 @@ export const getBudgetSettings = async (accessToken: String) => {
}
};
-export const getCallbacksCall = async (accessToken: String, userID: String, userRole: String) => {
+export const getCallbacksCall = async (accessToken: string, userID: string, userRole: string) => {
/**
* Get all the models user has access to
*/
@@ -4410,7 +4410,7 @@ export const getCallbacksCall = async (accessToken: String, userID: String, user
}
};
-export const getGeneralSettingsCall = async (accessToken: String) => {
+export const getGeneralSettingsCall = async (accessToken: string) => {
try {
let url = proxyBaseUrl
? `${proxyBaseUrl}/config/list?config_type=general_settings`
@@ -4442,7 +4442,7 @@ export const getGeneralSettingsCall = async (accessToken: String) => {
}
};
-export const getPassThroughEndpointsCall = async (accessToken: String) => {
+export const getPassThroughEndpointsCall = async (accessToken: string) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/config/pass_through_endpoint` : `/config/pass_through_endpoint`;
@@ -4472,7 +4472,7 @@ export const getPassThroughEndpointsCall = async (accessToken: String) => {
}
};
-export const getConfigFieldSetting = async (accessToken: String, fieldName: string) => {
+export const getConfigFieldSetting = async (accessToken: string, fieldName: string) => {
try {
let url = proxyBaseUrl
? `${proxyBaseUrl}/config/field/info?field_name=${fieldName}`
@@ -4503,7 +4503,7 @@ export const getConfigFieldSetting = async (accessToken: String, fieldName: stri
}
};
-export const updatePassThroughFieldSetting = async (accessToken: String, fieldName: string, fieldValue: any) => {
+export const updatePassThroughFieldSetting = async (accessToken: string, fieldName: string, fieldValue: any) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/config/pass_through_endpoint` : `/config/pass_through_endpoint`;
@@ -4539,7 +4539,7 @@ export const updatePassThroughFieldSetting = async (accessToken: String, fieldNa
}
};
-export const createPassThroughEndpoint = async (accessToken: String, formValues: Record<string, any>) => {
+export const createPassThroughEndpoint = async (accessToken: string, formValues: Record<string, any>) => {
/**
* Set callbacks on proxy
*/
@@ -4575,7 +4575,7 @@ export const createPassThroughEndpoint = async (accessToken: String, formValues:
}
};
-export const updateConfigFieldSetting = async (accessToken: String, fieldName: string, fieldValue: any) => {
+export const updateConfigFieldSetting = async (accessToken: string, fieldName: string, fieldValue: any) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/config/field/update` : `/config/field/update`;
@@ -4612,7 +4612,7 @@ export const updateConfigFieldSetting = async (accessToken: String, fieldName: s
}
};
-export const deleteConfigFieldSetting = async (accessToken: String, fieldName: String) => {
+export const deleteConfigFieldSetting = async (accessToken: string, fieldName: string) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/config/field/delete` : `/config/field/delete`;
@@ -4647,7 +4647,7 @@ export const deleteConfigFieldSetting = async (accessToken: String, fieldName: S
}
};
-export const deletePassThroughEndpointsCall = async (accessToken: String, endpointId: string) => {
+export const deletePassThroughEndpointsCall = async (accessToken: string, endpointId: string) => {
try {
let url = proxyBaseUrl
? `${proxyBaseUrl}/config/pass_through_endpoint?endpoint_id=${endpointId}`
@@ -4679,7 +4679,7 @@ export const deletePassThroughEndpointsCall = async (accessToken: String, endpoi
}
};
-export const setCallbacksCall = async (accessToken: String, formValues: Record<string, any>) => {
+export const setCallbacksCall = async (accessToken: string, formValues: Record<string, any>) => {
/**
* Set callbacks on proxy
*/
@@ -4715,7 +4715,7 @@ export const setCallbacksCall = async (accessToken: String, formValues: Record<s
}
};
-export const healthCheckCall = async (accessToken: String) => {
+export const healthCheckCall = async (accessToken: string) => {
/**
* Get all the models user has access to
*/
@@ -4748,7 +4748,7 @@ export const healthCheckCall = async (accessToken: String) => {
}
};
-export const individualModelHealthCheckCall = async (accessToken: String, modelName: string) => {
+export const individualModelHealthCheckCall = async (accessToken: string, modelName: string) => {
/**
* Run health check for a specific model using model name
*/
@@ -4780,7 +4780,7 @@ export const individualModelHealthCheckCall = async (accessToken: String, modelN
}
};
-export const cachingHealthCheckCall = async (accessToken: String) => {
+export const cachingHealthCheckCall = async (accessToken: string) => {
/**
* Get all the models user has access to
*/
@@ -4813,7 +4813,7 @@ export const cachingHealthCheckCall = async (accessToken: String) => {
};
export const healthCheckHistoryCall = async (
- accessToken: String,
+ accessToken: string,
model?: string,
statusFilter?: string,
limit: number = 100,
@@ -4857,7 +4857,7 @@ export const healthCheckHistoryCall = async (
}
};
-export const latestHealthChecksCall = async (accessToken: String) => {
+export const latestHealthChecksCall = async (accessToken: string) => {
/**
* Get the latest health check status for all models
*/
@@ -4886,7 +4886,7 @@ export const latestHealthChecksCall = async (accessToken: String) => {
}
};
-export const getProxyUISettings = async (accessToken: String) => {
+export const getProxyUISettings = async (accessToken: string) => {
/**
* Get all the models user has access to
*/
@@ -4921,7 +4921,7 @@ export const getProxyUISettings = async (accessToken: String) => {
}
};
-export const getGuardrailsList = async (accessToken: String) => {
+export const getGuardrailsList = async (accessToken: string) => {
try {
const url = proxyBaseUrl ? `${proxyBaseUrl}/v2/guardrails/list` : `/v2/guardrails/list`;
const response = await fetch(url, {
@@ -4947,7 +4947,7 @@ export const getGuardrailsList = async (accessToken: String) => {
}
};
-export const getPromptsList = async (accessToken: String): Promise<ListPromptsResponse> => {
+export const getPromptsList = async (accessToken: string): Promise<ListPromptsResponse> => {
try {
const url = proxyBaseUrl ? `${proxyBaseUrl}/prompts/list` : `/prompts/list`;
const response = await fetch(url, {
@@ -4973,7 +4973,7 @@ export const getPromptsList = async (accessToken: String): Promise<ListPromptsRe
}
};
-export const getPromptInfo = async (accessToken: String, promptId: string): Promise<PromptInfoResponse> => {
+export const getPromptInfo = async (accessToken: string, promptId: string): Promise<PromptInfoResponse> => {
try {
const url = proxyBaseUrl ? `${proxyBaseUrl}/prompts/${promptId}/info` : `/prompts/${promptId}/info`;
const response = await fetch(url, {
@@ -5393,7 +5393,7 @@ export const updateMCPServer = async (accessToken: string, formValues: Record<st
}
};
-export const deleteMCPServer = async (accessToken: String, serverId: String) => {
+export const deleteMCPServer = async (accessToken: string, serverId: string) => {
try {
const url = (proxyBaseUrl ? `${proxyBaseUrl}` : "") + `/v1/mcp/server/${serverId}`;
console.log("in deleteMCPServer:", serverId);
@@ -6270,7 +6270,7 @@ export const updateSSOSettings = async (accessToken: string, settings: Record<st
};
export const uiAuditLogsCall = async (
- accessToken: String,
+ accessToken: string,
start_date?: string,
end_date?: string,
page?: number,
@@ -6424,7 +6424,7 @@ export const getPassThroughEndpointInfo = async (accessToken: string, endpointPa
}
};
-export const deleteCallback = async (accessToken: String, callbackName: string) => {
+export const deleteCallback = async (accessToken: string, callbackName: string) => {
/**
* Delete specific callback from proxy using the /config/callback/delete API
*/
diff --git a/ui/litellm-dashboard/src/components/user_dashboard.tsx b/ui/litellm-dashboard/src/components/user_dashboard.tsx
index 73506b9b718..b00e3547892 100644
--- a/ui/litellm-dashboard/src/components/user_dashboard.tsx
+++ b/ui/litellm-dashboard/src/components/user_dashboard.tsx
@@ -59,7 +59,7 @@ interface UserDashboardProps {
type TeamInterface = {
models: any[];
team_id: null;
- team_alias: String;
+ team_alias: string;
};
const UserDashboard: React.FC<UserDashboardProps> = ({
diff --git a/ui/litellm-dashboard/src/components/view_users.tsx b/ui/litellm-dashboard/src/components/view_users.tsx
index 032485dc892..d0f17031ffc 100644
--- a/ui/litellm-dashboard/src/components/view_users.tsx
+++ b/ui/litellm-dashboard/src/components/view_users.tsx
@@ -34,7 +34,7 @@ interface ViewUserDashboardProps {
userRole: string | null;
userID: string | null;
teams: any[] | null;
- setKeys: React.Dispatch<React.SetStateAction<Object[] | null>>;
+ setKeys: React.Dispatch<React.SetStateAction<object[] | null>>;
}
interface FilterState {
diff --git a/ui/litellm-dashboard/src/utils/dataUtils.ts b/ui/litellm-dashboard/src/utils/dataUtils.ts
index dca18fd9557..4f5280a800e 100644
--- a/ui/litellm-dashboard/src/utils/dataUtils.ts
+++ b/ui/litellm-dashboard/src/utils/dataUtils.ts
@@ -1,6 +1,6 @@
import NotificationsManager from "@/components/molecules/notifications_manager";
-export function updateExistingKeys<Source extends Object>(target: Source, source: Object): Source {
+export function updateExistingKeys<Source extends object>(target: Source, source: object): Source {
const clonedTarget = structuredClone(target);
for (const [key, value] of Object.entries(source)) {