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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fixing build
yuneng-jiang3f1473d9a2da
diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.test.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.test.tsxindex a34d129a207..a5c2c446383 100644--- a/ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.test.tsx+++ b/ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.test.tsx@@ -1,11 +1,11 @@-import { render, screen, fireEvent, waitFor, act } from "@testing-library/react";-import { describe, it, expect, vi, beforeEach, beforeAll } from "vitest";-import NewUsagePage from "./UsagePageView";-import type { Organization } from "../../networking";-import * as networking from "../../networking";-import { useCustomers } from "@/app/(dashboard)/hooks/customers/useCustomers";import { useAgents } from "@/app/(dashboard)/hooks/agents/useAgents";+import { useCustomers } from "@/app/(dashboard)/hooks/customers/useCustomers";import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";+import { act, fireEvent, render, screen, waitFor } from "@testing-library/react";+import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";+import type { Organization } from "../../networking";+import * as networking from "../../networking";+import NewUsagePage from "./UsagePageView";// Polyfill ResizeObserver for test environmentbeforeAll(() => {diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.tsxindex 1c4dba84586..7d909db8c37 100644--- a/ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.tsx+++ b/ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.tsx@@ -30,13 +30,14 @@ import {import { Alert } from "antd";import React, { useCallback, useEffect, useMemo, useState } from "react";+import { useAgents } from "@/app/(dashboard)/hooks/agents/useAgents";import { useCustomers } from "@/app/(dashboard)/hooks/customers/useCustomers";+import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";import { formatNumberWithCommas } from "@/utils/dataUtils";import { Button } from "@tremor/react";import { all_admin_roles } from "../../../utils/roles";import { ActivityMetrics, processActivityData } from "../../activity_metrics";import CloudZeroExportModal from "../../cloudzero_export_modal";-import EntityUsage, { EntityList } from "./EntityUsage/EntityUsage";import EntityUsageExportModal from "../../EntityUsageExport";import { Team } from "../../key_team_helpers/key_list";import { Organization, tagListCall, userDailyActivityAggregatedCall, userDailyActivityCall } from "../../networking";@@ -44,14 +45,13 @@ import { getProviderLogoAndName } from "../../provider_info_helpers";import AdvancedDatePicker from "../../shared/advanced_date_picker";import { ChartLoader } from "../../shared/chart_loader";import { Tag } from "../../tag_management/types";-import TopKeyView from "./EntityUsage/TopKeyView";-import { DailyData, KeyMetricWithMetadata, MetricWithMetadata } from "../types";-import { valueFormatterSpend } from "../utils/value_formatters";import UserAgentActivity from "../../user_agent_activity";import ViewUserSpend from "../../view_user_spend";-import { useAgents } from "@/app/(dashboard)/hooks/agents/useAgents";-import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";-import { UsageViewSelect, UsageOption } from "./UsageViewSelect/UsageViewSelect";+import { DailyData, KeyMetricWithMetadata, MetricWithMetadata } from "../types";+import { valueFormatterSpend } from "../utils/value_formatters";+import EntityUsage, { EntityList } from "./EntityUsage/EntityUsage";+import TopKeyView from "./EntityUsage/TopKeyView";+import { UsageOption, UsageViewSelect } from "./UsageViewSelect/UsageViewSelect";interface UsagePageProps {teams: Team[];diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/UsageViewSelect/UsageViewSelect.test.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/UsageViewSelect/UsageViewSelect.test.tsxindex dede260dae6..c94a44d4a46 100644--- a/ui/litellm-dashboard/src/components/UsagePage/components/UsageViewSelect/UsageViewSelect.test.tsx+++ b/ui/litellm-dashboard/src/components/UsagePage/components/UsageViewSelect/UsageViewSelect.test.tsx@@ -1,6 +1,6 @@-import { render, screen, fireEvent, act } from "@testing-library/react";-import { describe, it, expect, vi, beforeEach } from "vitest";-import { UsageViewSelect, UsageOption } from "./UsageViewSelect";+import { act, fireEvent, render, screen } from "@testing-library/react";+import { beforeEach, describe, expect, it, vi } from "vitest";+import { UsageViewSelect } from "./UsageViewSelect";vi.mock("antd", async () => {const React = await import("react");diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/UsageViewSelect/UsageViewSelect.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/UsageViewSelect/UsageViewSelect.tsxindex 1cbe30ebcfc..4f65a69f951 100644--- a/ui/litellm-dashboard/src/components/UsagePage/components/UsageViewSelect/UsageViewSelect.tsx+++ b/ui/litellm-dashboard/src/components/UsagePage/components/UsageViewSelect/UsageViewSelect.tsx@@ -1,15 +1,15 @@-import React from "react";-import { Select } from "antd";import {- GlobalOutlined,BankOutlined,- TeamOutlined,+ BarChartOutlined,+ GlobalOutlined,+ LineChartOutlined,+ RobotOutlined,ShoppingCartOutlined,TagsOutlined,- RobotOutlined,- LineChartOutlined,- BarChartOutlined,+ TeamOutlined,} from "@ant-design/icons";+import { Select } from "antd";+import React from "react";export type UsageOption = "global" | "organization" | "team" | "customer" | "tag" | "agent" | "user-agent-activity";export interface UsageViewSelectProps {value: UsageOption;