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
refactor(ui): rename view_logs to logs and split request, audit and detail (#44505)
devin-ai-integration[bot]1459e004300c
diff --git a/tests/unit/proxy/auth/test_route_checks.py b/tests/unit/proxy/auth/test_route_checks.pyindex 6b1d8bc3a2c..d0d52dd6566 100644--- a/tests/unit/proxy/auth/test_route_checks.py+++ b/tests/unit/proxy/auth/test_route_checks.py@@ -2218,9 +2218,9 @@ def test_proxy_admin_viewer_can_access_audit_logs(route):# layer, even though the underlying handlers already gate on PROXY_ADMIN_VIEW_ONLY.## Each route below corresponds to a network call made by the Logs page-# (ui/litellm-dashboard/src/components/view_logs/) — see the comment on each.+# (ui/litellm-dashboard/src/components/logs/) — see the comment on each.ADMIN_VIEWER_LOGS_PAGE_ROUTES = [- # Main paginated log list — uiSpendLogsCall in log_filter_logic.tsx & index.tsx+ # Main paginated log list — uiSpendLogsCall in request/useLogFilterLogic.ts & index.tsx"/spend/logs/ui",# Single-log detail drawer — fetched on row click in LogDetailsDrawer"/spend/logs/ui/abc-request-id",diff --git a/ui/litellm-dashboard/eslint-suppressions.json b/ui/litellm-dashboard/eslint-suppressions.jsonindex 61ab85d613a..74672cf950e 100644--- a/ui/litellm-dashboard/eslint-suppressions.json+++ b/ui/litellm-dashboard/eslint-suppressions.json@@ -2266,12 +2266,12 @@"count": 1}},- "src/components/view_logs/EvalViewer/EvalViewer.tsx": {+ "src/components/logs/detail/sections/EvalViewer/EvalViewer.tsx": {"no-nested-ternary": {"count": 1}},- "src/components/view_logs/GuardrailViewer/CompliancePanel.tsx": {+ "src/components/logs/detail/sections/GuardrailViewer/CompliancePanel.tsx": {"no-nested-ternary": {"count": 2},@@ -2279,17 +2279,17 @@"count": 1}},- "src/components/view_logs/GuardrailViewer/ContentFilterDetails.tsx": {+ "src/components/logs/detail/sections/GuardrailViewer/ContentFilterDetails.tsx": {"no-nested-ternary": {"count": 1}},- "src/components/view_logs/GuardrailViewer/GuardrailViewer.tsx": {+ "src/components/logs/detail/sections/GuardrailViewer/GuardrailViewer.tsx": {"no-nested-ternary": {"count": 3}},- "src/components/view_logs/LogDetailsDrawer/LogDetailsDrawer.tsx": {+ "src/components/logs/detail/LogDetailsDrawer.tsx": {"no-nested-ternary": {"count": 2},@@ -2297,22 +2297,22 @@"count": 2}},- "src/components/view_logs/LogDetailsDrawer/useKeyboardNavigation.ts": {+ "src/components/logs/detail/useKeyboardNavigation.ts": {"react-hooks/immutability": {"count": 2}},- "src/components/view_logs/columns.tsx": {+ "src/components/logs/types.ts": {"local/filename-pascal-case": {"count": 1}},- "src/components/view_logs/log_filter_logic.tsx": {+ "src/components/logs/request/useLogFilterLogic.ts": {"local/filename-pascal-case": {"count": 1}},- "src/components/view_logs/logs_utils.tsx": {+ "src/components/logs/request/timeRange.ts": {"local/filename-pascal-case": {"count": 1}diff --git a/ui/litellm-dashboard/src/app/(dashboard)/cost-optimization/_components/PromptCachingRequestsTable.tsx b/ui/litellm-dashboard/src/app/(dashboard)/cost-optimization/_components/PromptCachingRequestsTable.tsxindex ba9cfd8ca22..c6900a3b2ab 100644--- a/ui/litellm-dashboard/src/app/(dashboard)/cost-optimization/_components/PromptCachingRequestsTable.tsx+++ b/ui/litellm-dashboard/src/app/(dashboard)/cost-optimization/_components/PromptCachingRequestsTable.tsx@@ -11,7 +11,7 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";-import { LOG_ID_QUERY_PARAM } from "@/components/view_logs/logDetailRouting";+import { LOG_ID_QUERY_PARAM } from "@/components/logs/request/logDetailRouting";import type { paths } from "@/lib/http/schema";import { formatNumberWithCommas } from "@/utils/dataUtils";import { uiHref } from "@/utils/uiHref";diff --git a/ui/litellm-dashboard/src/app/(dashboard)/logs/page.integration.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/logs/page.integration.test.tsxindex dc8a57e50ba..c463a04bf05 100644--- a/ui/litellm-dashboard/src/app/(dashboard)/logs/page.integration.test.tsx+++ b/ui/litellm-dashboard/src/app/(dashboard)/logs/page.integration.test.tsx@@ -17,7 +17,7 @@ vi.mock("@/app/(dashboard)/hooks/organizations/useOrganizations", () => ({useOrganizations: useOrganizationsMock,}));-vi.mock("@/components/view_logs/RequestLogsPanel", () => ({+vi.mock("@/components/logs/request/RequestLogsPanel", () => ({default: function RequestLogsPanelMock() {return <div data-testid="request-logs-panel" />;},diff --git a/ui/litellm-dashboard/src/app/(dashboard)/logs/page.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/logs/page.test.tsxindex c7e0a82a363..0e86e8bb9d2 100644--- a/ui/litellm-dashboard/src/app/(dashboard)/logs/page.test.tsx+++ b/ui/litellm-dashboard/src/app/(dashboard)/logs/page.test.tsx@@ -17,13 +17,13 @@ vi.mock("@/app/(dashboard)/hooks/organizations/useOrganizations", () => ({useOrganizations: useOrganizationsMock,}));-vi.mock("@/components/view_logs/RequestLogsPanel", () => ({+vi.mock("@/components/logs/request/RequestLogsPanel", () => ({default: function RequestLogsPanelMock({ isActive }: { isActive: boolean }) {return <div data-testid="request-logs-panel">{isActive ? "active" : "inactive"}</div>;},}));-vi.mock("@/components/view_logs/AuditLogsPanel", () => ({+vi.mock("@/components/logs/audit/AuditLogsPanel", () => ({default: function AuditLogsPanelMock({ isActive }: { isActive: boolean }) {return <div data-testid="audit-logs-panel">{isActive ? "active" : "inactive"}</div>;},diff --git a/ui/litellm-dashboard/src/app/(dashboard)/logs/page.tsx b/ui/litellm-dashboard/src/app/(dashboard)/logs/page.tsxindex 51603dec29e..a9672b088ba 100644--- a/ui/litellm-dashboard/src/app/(dashboard)/logs/page.tsx+++ b/ui/litellm-dashboard/src/app/(dashboard)/logs/page.tsx@@ -5,8 +5,8 @@ import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";import useCan from "@/app/(dashboard)/hooks/useCan";import DeletedKeysPage from "@/components/DeletedKeysPage/DeletedKeysPage";import DeletedTeamsPage from "@/components/DeletedTeamsPage/DeletedTeamsPage";-import AuditLogsPanel from "@/components/view_logs/AuditLogsPanel";-import RequestLogsPanel from "@/components/view_logs/RequestLogsPanel";+import AuditLogsPanel from "@/components/logs/audit/AuditLogsPanel";+import RequestLogsPanel from "@/components/logs/request/RequestLogsPanel";import { Page, PageTabs, PageTabsList, PageTabsTrigger, PageTabsContent } from "@/components/shared/Page";import { UiLoadingSpinner } from "@/components/ui/ui-loading-spinner";diff --git a/ui/litellm-dashboard/src/components/GuardrailsMonitor/LogViewer.test.tsx b/ui/litellm-dashboard/src/components/GuardrailsMonitor/LogViewer.test.tsxindex 083b1e5f3e2..c1fb0431e8e 100644--- a/ui/litellm-dashboard/src/components/GuardrailsMonitor/LogViewer.test.tsx+++ b/ui/litellm-dashboard/src/components/GuardrailsMonitor/LogViewer.test.tsx@@ -3,7 +3,7 @@ import React from "react";import { beforeEach, describe, expect, it, vi } from "vitest";import { renderWithProviders, screen, testQueryClient, waitFor, within } from "../../../tests/test-utils";-import type { LogEntry as SpendLogEntry } from "@/components/view_logs/columns";+import type { LogEntry as SpendLogEntry } from "@/components/logs/types";import { LogViewer } from "./LogViewer";vi.mock("@/components/networking", async (importOriginal) => {@@ -11,7 +11,7 @@ vi.mock("@/components/networking", async (importOriginal) => {return { ...actual, uiSpendLogsCall: vi.fn() };});-vi.mock("@/components/view_logs/LogDetailsDrawer", () => ({+vi.mock("@/components/logs/detail", () => ({LogDetailsDrawer: function LogDetailsDrawerMock({open,logEntry,diff --git a/ui/litellm-dashboard/src/components/GuardrailsMonitor/LogViewer.tsx b/ui/litellm-dashboard/src/components/GuardrailsMonitor/LogViewer.tsxindex 2abd699ba86..1e2538100ae 100644--- a/ui/litellm-dashboard/src/components/GuardrailsMonitor/LogViewer.tsx+++ b/ui/litellm-dashboard/src/components/GuardrailsMonitor/LogViewer.tsx@@ -5,8 +5,8 @@ import React, { useState } from "react";import { Button } from "@/components/ui/button";import { UiLoadingSpinner } from "@/components/ui/ui-loading-spinner";import { uiSpendLogsCall } from "@/components/networking";-import { LogDetailsDrawer } from "@/components/view_logs/LogDetailsDrawer";-import type { LogEntry as ViewLogsLogEntry } from "@/components/view_logs/columns";+import { LogDetailsDrawer } from "@/components/logs/detail";+import type { LogEntry as ViewLogsLogEntry } from "@/components/logs/types";import type { LogEntry } from "./mockData";const actionConfig: Record<diff --git a/ui/litellm-dashboard/src/components/add_model/AutoRouterRoutingTest.tsx b/ui/litellm-dashboard/src/components/add_model/AutoRouterRoutingTest.tsxindex 2b6c06e9a96..44ef0e61340 100644--- a/ui/litellm-dashboard/src/components/add_model/AutoRouterRoutingTest.tsx+++ b/ui/litellm-dashboard/src/components/add_model/AutoRouterRoutingTest.tsx@@ -3,7 +3,7 @@ import { TriangleAlert } from "lucide-react";import { Badge } from "@/components/ui/badge";import { Button } from "@/components/ui/button";import { Textarea } from "@/components/ui/textarea";-import RoutingDecisionCard from "@/components/view_logs/LogDetailsDrawer/RoutingDecisionCard";+import RoutingDecisionCard from "@/components/logs/detail/RoutingDecisionCard";import { AutoRouterRoutingTestResult, testAutoRouterRouting } from "../networking";import { ComplexityRouterConfigPayload, getHeuristicV2SuccessThresholdError } from "./build_complexity_router_config";import { buildAutoRouterRoutingTestRequest } from "./build_auto_router_routing_test_request";diff --git a/ui/litellm-dashboard/src/components/common_components/simple_table.tsx b/ui/litellm-dashboard/src/components/common_components/simple_table.tsxindex a4b84d28801..8d174e49cf2 100644--- a/ui/litellm-dashboard/src/components/common_components/simple_table.tsx+++ b/ui/litellm-dashboard/src/components/common_components/simple_table.tsx@@ -28,7 +28,7 @@ interface SimpleTableProps<T> {/*** Simple table component for forms and settings pages- * For complex tables with sorting/filtering, use DataTable from view_logs+ * For complex tables with sorting/filtering, use DataTable from shared/DataTable*/export function SimpleTable<T>({data,diff --git a/ui/litellm-dashboard/src/components/lens/traces/detail/RequestDetail.tsx b/ui/litellm-dashboard/src/components/lens/traces/detail/RequestDetail.tsxindex 58177ede37a..242d89b21a0 100644--- a/ui/litellm-dashboard/src/components/lens/traces/detail/RequestDetail.tsx+++ b/ui/litellm-dashboard/src/components/lens/traces/detail/RequestDetail.tsx@@ -5,7 +5,7 @@ import { useState } from "react";import { Button } from "@/components/ui/button";-import { LogDetailsDrawer } from "../../../view_logs/LogDetailsDrawer";+import { LogDetailsDrawer } from "../../../logs/detail";import { formatCost } from "../list/AgentTracesTable";import { DetailGroup } from "./AttributesDetail";import { CopyButton } from "../ui/CopyButton";diff --git a/ui/litellm-dashboard/src/components/lens/traces/detail/useSpanRequestLog.ts b/ui/litellm-dashboard/src/components/lens/traces/detail/useSpanRequestLog.tsindex c654ca55793..0bbc5aea1e2 100644--- a/ui/litellm-dashboard/src/components/lens/traces/detail/useSpanRequestLog.ts+++ b/ui/litellm-dashboard/src/components/lens/traces/detail/useSpanRequestLog.ts@@ -4,7 +4,7 @@ import { useQuery, type UseQueryOptions } from "@tanstack/react-query";import moment from "moment";import { uiSpendLogsCall } from "../../../networking";-import type { LogEntry } from "../../../view_logs/columns";+import type { LogEntry } from "../../../logs/types";/** Spend-log timestamps are written when the call finishes, so pad the span start on both sides. */const LOOKUP_PAD_MINUTES = 30;diff --git a/ui/litellm-dashboard/src/components/view_logs/AuditLogDrawer/AuditLogDrawer.test.tsx b/ui/litellm-dashboard/src/components/logs/audit/AuditLogDrawer/AuditLogDrawer.test.tsxsimilarity index 99%rename from ui/litellm-dashboard/src/components/view_logs/AuditLogDrawer/AuditLogDrawer.test.tsxrename to ui/litellm-dashboard/src/components/logs/audit/AuditLogDrawer/AuditLogDrawer.test.tsxindex b0672cee296..da158fb8450 100644--- a/ui/litellm-dashboard/src/components/view_logs/AuditLogDrawer/AuditLogDrawer.test.tsx+++ b/ui/litellm-dashboard/src/components/logs/audit/AuditLogDrawer/AuditLogDrawer.test.tsx@@ -5,7 +5,7 @@ import moment from "moment";import { AuditLogDrawer } from "./AuditLogDrawer";import { AuditLogEntry } from "../AuditLogsTableColumns";-vi.mock("../../common_components/DefaultProxyAdminTag", () => ({+vi.mock("../../../common_components/DefaultProxyAdminTag", () => ({default: ({ userId }: { userId: string }) => <span>{userId}</span>,}));diff --git a/ui/litellm-dashboard/src/components/view_logs/AuditLogDrawer/AuditLogDrawer.tsx b/ui/litellm-dashboard/src/components/logs/audit/AuditLogDrawer/AuditLogDrawer.tsxsimilarity index 99%rename from ui/litellm-dashboard/src/components/view_logs/AuditLogDrawer/AuditLogDrawer.tsxrename to ui/litellm-dashboard/src/components/logs/audit/AuditLogDrawer/AuditLogDrawer.tsxindex bb50d162181..fae3c35b80c 100644--- a/ui/litellm-dashboard/src/components/view_logs/AuditLogDrawer/AuditLogDrawer.tsx+++ b/ui/litellm-dashboard/src/components/logs/audit/AuditLogDrawer/AuditLogDrawer.tsx@@ -2,7 +2,7 @@ import { Check, Copy } from "lucide-react";import { useState, useCallback } from "react";import moment from "moment";import { AuditLogEntry, AUDIT_TABLE_NAME_DISPLAY } from "../AuditLogsTableColumns";-import DefaultProxyAdminTag from "../../common_components/DefaultProxyAdminTag";+import DefaultProxyAdminTag from "../../../common_components/DefaultProxyAdminTag";import CopyButton from "@/components/shared/CopyButton";import { StatusBadge, type StatusTone } from "@/components/shared/table_cells/status_badge";import { Button } from "@/components/ui/button";diff --git a/ui/litellm-dashboard/src/components/view_logs/AuditLogsPanel.test.tsx b/ui/litellm-dashboard/src/components/logs/audit/AuditLogsPanel.test.tsxsimilarity index 95%rename from ui/litellm-dashboard/src/components/view_logs/AuditLogsPanel.test.tsxrename to ui/litellm-dashboard/src/components/logs/audit/AuditLogsPanel.test.tsxindex 3b27f663b8e..0c83d5a2d89 100644--- a/ui/litellm-dashboard/src/components/view_logs/AuditLogsPanel.test.tsx+++ b/ui/litellm-dashboard/src/components/logs/audit/AuditLogsPanel.test.tsx@@ -3,11 +3,11 @@ import { fireEvent, render, screen, waitFor } from "@testing-library/react";import userEvent from "@testing-library/user-event";import { beforeEach, describe, expect, it, vi } from "vitest";-import { chooseSelectOption } from "../../../tests/test-utils";+import { chooseSelectOption } from "../../../../tests/test-utils";import AuditLogsPanel from "./AuditLogsPanel";-vi.mock("../networking", async (importOriginal) => {- const actual = await importOriginal<typeof import("../networking")>();+vi.mock("../../networking", async (importOriginal) => {+ const actual = await importOriginal<typeof import("../../networking")>();return { ...actual, uiAuditLogsCall: vi.fn() };});@@ -16,7 +16,7 @@ vi.mock("@tanstack/react-pacer/debouncer", () => ({useDebouncedValue: (value: unknown) => [value, { cancel: vi.fn(), flush: vi.fn() }],}));-import { uiAuditLogsCall } from "../networking";+import { uiAuditLogsCall } from "../../networking";type AuditLogsParams = NonNullable<Parameters<typeof uiAuditLogsCall>[0]["params"]>;diff --git a/ui/litellm-dashboard/src/components/view_logs/AuditLogsPanel.tsx b/ui/litellm-dashboard/src/components/logs/audit/AuditLogsPanel.tsxsimilarity index 99%rename from ui/litellm-dashboard/src/components/view_logs/AuditLogsPanel.tsxrename to ui/litellm-dashboard/src/components/logs/audit/AuditLogsPanel.tsxindex 6480cb59682..f174f45a791 100644--- a/ui/litellm-dashboard/src/components/view_logs/AuditLogsPanel.tsx+++ b/ui/litellm-dashboard/src/components/logs/audit/AuditLogsPanel.tsx@@ -4,7 +4,7 @@ import { useQuery, keepPreviousData } from "@tanstack/react-query";import { ColumnFiltersState, OnChangeFn, PaginationState } from "@tanstack/react-table";import { resolveLogoSrc } from "@/lib/assetPaths";import { DEBOUNCE_WAIT_MS } from "@/utils/debounceConstants";-import { uiAuditLogsCall } from "../networking";+import { uiAuditLogsCall } from "../../networking";import { AuditLogEntry } from "./AuditLogsTableColumns";import { AuditLogsTable } from "./AuditLogsTable";import { AuditLogDrawer } from "./AuditLogDrawer/AuditLogDrawer";diff --git a/ui/litellm-dashboard/src/components/view_logs/AuditLogsTable.test.tsx b/ui/litellm-dashboard/src/components/logs/audit/AuditLogsTable.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/AuditLogsTable.test.tsxrename to ui/litellm-dashboard/src/components/logs/audit/AuditLogsTable.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/AuditLogsTable.tsx b/ui/litellm-dashboard/src/components/logs/audit/AuditLogsTable.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/AuditLogsTable.tsxrename to ui/litellm-dashboard/src/components/logs/audit/AuditLogsTable.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/AuditLogsTableColumns.tsx b/ui/litellm-dashboard/src/components/logs/audit/AuditLogsTableColumns.tsxsimilarity index 97%rename from ui/litellm-dashboard/src/components/view_logs/AuditLogsTableColumns.tsxrename to ui/litellm-dashboard/src/components/logs/audit/AuditLogsTableColumns.tsxindex 10e19e25a77..17e057a1343 100644--- a/ui/litellm-dashboard/src/components/view_logs/AuditLogsTableColumns.tsx+++ b/ui/litellm-dashboard/src/components/logs/audit/AuditLogsTableColumns.tsx@@ -4,7 +4,7 @@ import { ColumnDef } from "@tanstack/react-table";import { DateCell, IdCell, IdentityCell, StatusBadge, type StatusTone } from "@/components/shared/table_cells";-import DefaultProxyAdminTag from "../common_components/DefaultProxyAdminTag";+import DefaultProxyAdminTag from "../../common_components/DefaultProxyAdminTag";export type AuditLogEntry = {id: string;diff --git a/ui/litellm-dashboard/src/components/view_logs/batchLogUtils.test.ts b/ui/litellm-dashboard/src/components/logs/batchLogUtils.test.tssimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/batchLogUtils.test.tsrename to ui/litellm-dashboard/src/components/logs/batchLogUtils.test.tsdiff --git a/ui/litellm-dashboard/src/components/view_logs/batchLogUtils.ts b/ui/litellm-dashboard/src/components/logs/batchLogUtils.tssimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/batchLogUtils.tsrename to ui/litellm-dashboard/src/components/logs/batchLogUtils.tsdiff --git a/ui/litellm-dashboard/src/components/view_logs/constants.ts b/ui/litellm-dashboard/src/components/logs/constants.tssimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/constants.tsrename to ui/litellm-dashboard/src/components/logs/constants.tsdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/ClassifierAuditView.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/ClassifierAuditView.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/ClassifierAuditView.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/ClassifierAuditView.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/ClassifierAuditView.tsx b/ui/litellm-dashboard/src/components/logs/detail/ClassifierAuditView.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/ClassifierAuditView.tsxrename to ui/litellm-dashboard/src/components/logs/detail/ClassifierAuditView.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/ClassifyTag.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/ClassifyTag.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/ClassifyTag.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/ClassifyTag.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/ClassifyTag.tsx b/ui/litellm-dashboard/src/components/logs/detail/ClassifyTag.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/ClassifyTag.tsxrename to ui/litellm-dashboard/src/components/logs/detail/ClassifyTag.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/CollapsibleMessage.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/CollapsibleMessage.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/CollapsibleMessage.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/CollapsibleMessage.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/CollapsibleMessage.tsx b/ui/litellm-dashboard/src/components/logs/detail/CollapsibleMessage.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/CollapsibleMessage.tsxrename to ui/litellm-dashboard/src/components/logs/detail/CollapsibleMessage.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/DrawerHeader.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/DrawerHeader.test.tsxsimilarity index 98%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/DrawerHeader.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/DrawerHeader.test.tsxindex ef320f04f58..983d6650478 100644--- a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/DrawerHeader.test.tsx+++ b/ui/litellm-dashboard/src/components/logs/detail/DrawerHeader.test.tsx@@ -2,7 +2,7 @@ import { screen, within } from "@testing-library/react";import { describe, expect, it, vi } from "vitest";import { render } from "../../../../tests/test-utils";-import type { LogEntry } from "../columns";+import type { LogEntry } from "../types";import { DrawerHeader } from "./DrawerHeader";const logEntry = (overrides: Partial<LogEntry>): LogEntry =>diff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/DrawerHeader.tsx b/ui/litellm-dashboard/src/components/logs/detail/DrawerHeader.tsxsimilarity index 99%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/DrawerHeader.tsxrename to ui/litellm-dashboard/src/components/logs/detail/DrawerHeader.tsxindex a4afdb68fae..bc24614a744 100644--- a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/DrawerHeader.tsx+++ b/ui/litellm-dashboard/src/components/logs/detail/DrawerHeader.tsx@@ -4,7 +4,7 @@ import moment from "moment";import { Badge } from "@/components/ui/badge";import { Button } from "@/components/ui/button";import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";-import { LogEntry } from "../columns";+import { LogEntry } from "../types";import { AutoRouterTag } from "@/components/shared/table_cells";import { ClassifyTag } from "./ClassifyTag";import { SidebarToggle } from "./SidebarToggle";diff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/HistoryTree.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/HistoryTree.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/HistoryTree.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/HistoryTree.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/HistoryTree.tsx b/ui/litellm-dashboard/src/components/logs/detail/HistoryTree.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/HistoryTree.tsxrename to ui/litellm-dashboard/src/components/logs/detail/HistoryTree.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/InputCard.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/InputCard.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/InputCard.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/InputCard.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/InputCard.tsx b/ui/litellm-dashboard/src/components/logs/detail/InputCard.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/InputCard.tsxrename to ui/litellm-dashboard/src/components/logs/detail/InputCard.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/JsonViewer.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/JsonViewer.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/JsonViewer.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/JsonViewer.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/JsonViewer.tsx b/ui/litellm-dashboard/src/components/logs/detail/JsonViewer.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/JsonViewer.tsxrename to ui/litellm-dashboard/src/components/logs/detail/JsonViewer.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailContent.integration.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/LogDetailContent.integration.test.tsxsimilarity index 99%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailContent.integration.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/LogDetailContent.integration.test.tsxindex e0551c61062..6c2569710e6 100644--- a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailContent.integration.test.tsx+++ b/ui/litellm-dashboard/src/components/logs/detail/LogDetailContent.integration.test.tsx@@ -2,9 +2,9 @@ import { render, screen, within } from "@testing-library/react";import userEvent from "@testing-library/user-event";import { describe, expect, it, vi } from "vitest";import { GuardrailJumpLink, LogDetailContent } from "./LogDetailContent";-import type { LogEntry } from "../columns";+import type { LogEntry } from "../types";-vi.mock("../GuardrailViewer/GuardrailViewer", () => ({+vi.mock("./sections/GuardrailViewer/GuardrailViewer", () => ({default: ({ data }: { data: unknown }) => <div data-testid="guardrail-viewer">{JSON.stringify(data)}</div>,}));diff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailContent.tsx b/ui/litellm-dashboard/src/components/logs/detail/LogDetailContent.tsxsimilarity index 98%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailContent.tsxrename to ui/litellm-dashboard/src/components/logs/detail/LogDetailContent.tsxindex f3762223e96..0da6a5e790b 100644--- a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailContent.tsx+++ b/ui/litellm-dashboard/src/components/logs/detail/LogDetailContent.tsx@@ -8,11 +8,11 @@ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/componentimport { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";import { UiLoadingSpinner } from "@/components/ui/ui-loading-spinner";-import { LogEntry } from "../columns";+import { LogEntry } from "../types";import { formatNumberWithCommas } from "@/utils/dataUtils";import { PROMPT_CACHE_CREATION_TOOLTIP, PROMPT_CACHE_READ_TOOLTIP } from "@/utils/promptCacheUsage";-import GuardrailViewer from "../GuardrailViewer/GuardrailViewer";-import EvalViewer from "../EvalViewer/EvalViewer";+import GuardrailViewer from "./sections/GuardrailViewer/GuardrailViewer";+import EvalViewer from "./sections/EvalViewer/EvalViewer";import {getBatchIdFromRequestId,getBatchModels,@@ -20,9 +20,9 @@ import {getReasoningTokens,isBatchCallType,} from "../batchLogUtils";-import { CostBreakdownViewer } from "../CostBreakdownViewer";-import { ConfigInfoMessage } from "../ConfigInfoMessage";-import { VectorStoreViewer } from "../VectorStoreViewer";+import { CostBreakdownViewer } from "./sections/CostBreakdownViewer";+import { ConfigInfoMessage } from "./sections/ConfigInfoMessage";+import { VectorStoreViewer } from "./sections/VectorStoreViewer";import { CREDENTIAL_LABELS } from "../constants";import { TruncatedValue } from "./TruncatedValue";import { TokenFlow } from "./TokenFlow";@@ -47,7 +47,7 @@ import {FONT_FAMILY_MONO,SPACING_XLARGE,} from "./constants";-import { ToolsSection } from "../ToolsSection";+import { ToolsSection } from "./sections/ToolsSection";import { PrettyMessagesView } from "./PrettyMessagesView";import { ClassifierAuditView } from "./ClassifierAuditView";import { AUTOROUTER_CLASSIFIER_ORIGIN } from "./ClassifyTag";diff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailsDrawer.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/LogDetailsDrawer.test.tsxsimilarity index 99%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailsDrawer.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/LogDetailsDrawer.test.tsxindex f5bf7cda951..1321a4a152a 100644--- a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailsDrawer.test.tsx+++ b/ui/litellm-dashboard/src/components/logs/detail/LogDetailsDrawer.test.tsx@@ -3,7 +3,7 @@ import { fireEvent, render, screen, waitFor } from "@testing-library/react";import { describe, expect, it, vi } from "vitest";import { LogDetailsDrawer } from "./LogDetailsDrawer";import { sessionSpendLogsCall } from "../../networking";-import { LogEntry } from "../columns";+import { LogEntry } from "../types";import { AutoRouterModelGroupsProvider } from "@/components/shared/table_cells";vi.mock("../../networking", () => ({diff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailsDrawer.tsx b/ui/litellm-dashboard/src/components/logs/detail/LogDetailsDrawer.tsxsimilarity index 99%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailsDrawer.tsxrename to ui/litellm-dashboard/src/components/logs/detail/LogDetailsDrawer.tsxindex dc9207d59eb..3b4debd7e0b 100644--- a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/LogDetailsDrawer.tsx+++ b/ui/litellm-dashboard/src/components/logs/detail/LogDetailsDrawer.tsx@@ -2,10 +2,10 @@ import { useEffect, useMemo, useState } from "react";import { Bot, Check, Copy, Sparkles, Wrench } from "lucide-react";import { Sheet, SheetContent, SheetTitle } from "@/components/ui/sheet";import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";-import { LogEntry } from "../columns";+import { LogEntry } from "../types";import { AutoRouterIcon, useIsAutoRoutedModelGroup } from "@/components/shared/table_cells";import { AGENT_CALL_TYPES, MCP_CALL_TYPES } from "../constants";-import { getEventDisplayName } from "../utils";+import { getEventDisplayName } from "./eventDisplayName";import { ClassifyTag } from "./ClassifyTag";import { DrawerHeader } from "./DrawerHeader";import { SidebarToggle } from "./SidebarToggle";diff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/OutputCard.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/OutputCard.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/OutputCard.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/OutputCard.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/OutputCard.tsx b/ui/litellm-dashboard/src/components/logs/detail/OutputCard.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/OutputCard.tsxrename to ui/litellm-dashboard/src/components/logs/detail/OutputCard.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/PrettyMessagesView.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/PrettyMessagesView.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/PrettyMessagesView.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/PrettyMessagesView.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/PrettyMessagesView.tsx b/ui/litellm-dashboard/src/components/logs/detail/PrettyMessagesView.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/PrettyMessagesView.tsxrename to ui/litellm-dashboard/src/components/logs/detail/PrettyMessagesView.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/RealtimePrettyView.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/RealtimePrettyView.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/RealtimePrettyView.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/RealtimePrettyView.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/RealtimePrettyView.tsx b/ui/litellm-dashboard/src/components/logs/detail/RealtimePrettyView.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/RealtimePrettyView.tsxrename to ui/litellm-dashboard/src/components/logs/detail/RealtimePrettyView.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/RoutingDecisionCard.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/RoutingDecisionCard.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/RoutingDecisionCard.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/RoutingDecisionCard.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/RoutingDecisionCard.tsx b/ui/litellm-dashboard/src/components/logs/detail/RoutingDecisionCard.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/RoutingDecisionCard.tsxrename to ui/litellm-dashboard/src/components/logs/detail/RoutingDecisionCard.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/SectionHeader.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/SectionHeader.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/SectionHeader.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/SectionHeader.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/SectionHeader.tsx b/ui/litellm-dashboard/src/components/logs/detail/SectionHeader.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/SectionHeader.tsxrename to ui/litellm-dashboard/src/components/logs/detail/SectionHeader.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/SidebarToggle.tsx b/ui/litellm-dashboard/src/components/logs/detail/SidebarToggle.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/SidebarToggle.tsxrename to ui/litellm-dashboard/src/components/logs/detail/SidebarToggle.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/SimpleMessageBlock.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/SimpleMessageBlock.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/SimpleMessageBlock.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/SimpleMessageBlock.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/SimpleMessageBlock.tsx b/ui/litellm-dashboard/src/components/logs/detail/SimpleMessageBlock.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/SimpleMessageBlock.tsxrename to ui/litellm-dashboard/src/components/logs/detail/SimpleMessageBlock.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/SimpleToolCallBlock.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/SimpleToolCallBlock.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/SimpleToolCallBlock.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/SimpleToolCallBlock.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/SimpleToolCallBlock.tsx b/ui/litellm-dashboard/src/components/logs/detail/SimpleToolCallBlock.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/SimpleToolCallBlock.tsxrename to ui/litellm-dashboard/src/components/logs/detail/SimpleToolCallBlock.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/TokenFlow.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/TokenFlow.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/TokenFlow.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/TokenFlow.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/TokenFlow.tsx b/ui/litellm-dashboard/src/components/logs/detail/TokenFlow.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/TokenFlow.tsxrename to ui/litellm-dashboard/src/components/logs/detail/TokenFlow.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/TruncatedValue.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/TruncatedValue.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/TruncatedValue.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/TruncatedValue.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/TruncatedValue.tsx b/ui/litellm-dashboard/src/components/logs/detail/TruncatedValue.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/TruncatedValue.tsxrename to ui/litellm-dashboard/src/components/logs/detail/TruncatedValue.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/constants.ts b/ui/litellm-dashboard/src/components/logs/detail/constants.tssimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/constants.tsrename to ui/litellm-dashboard/src/components/logs/detail/constants.tsdiff --git a/ui/litellm-dashboard/src/components/view_logs/utils.ts b/ui/litellm-dashboard/src/components/logs/detail/eventDisplayName.tssimilarity index 93%rename from ui/litellm-dashboard/src/components/view_logs/utils.tsrename to ui/litellm-dashboard/src/components/logs/detail/eventDisplayName.tsindex 37a82a7523e..09883b427d5 100644--- a/ui/litellm-dashboard/src/components/view_logs/utils.ts+++ b/ui/litellm-dashboard/src/components/logs/detail/eventDisplayName.ts@@ -1,4 +1,4 @@-import { MCP_CALL_TYPES } from "./constants";+import { MCP_CALL_TYPES } from "../constants";/*** Derive a short, human-readable display name for a log entry.diff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/index.ts b/ui/litellm-dashboard/src/components/logs/detail/index.tssimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/index.tsrename to ui/litellm-dashboard/src/components/logs/detail/index.tsdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/prettyMessagesTypes.ts b/ui/litellm-dashboard/src/components/logs/detail/prettyMessagesTypes.tssimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/prettyMessagesTypes.tsrename to ui/litellm-dashboard/src/components/logs/detail/prettyMessagesTypes.tsdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/prettyMessagesUtils.ts b/ui/litellm-dashboard/src/components/logs/detail/prettyMessagesUtils.tssimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/prettyMessagesUtils.tsrename to ui/litellm-dashboard/src/components/logs/detail/prettyMessagesUtils.tsdiff --git a/ui/litellm-dashboard/src/components/view_logs/ConfigInfoMessage.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/ConfigInfoMessage.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/ConfigInfoMessage.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/ConfigInfoMessage.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/ConfigInfoMessage.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/ConfigInfoMessage.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/ConfigInfoMessage.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/ConfigInfoMessage.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/CostBreakdownViewer.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/CostBreakdownViewer.test.tsxsimilarity index 98%rename from ui/litellm-dashboard/src/components/view_logs/CostBreakdownViewer.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/CostBreakdownViewer.test.tsxindex d484185f873..ee7535ca6ff 100644--- a/ui/litellm-dashboard/src/components/view_logs/CostBreakdownViewer.test.tsx+++ b/ui/litellm-dashboard/src/components/logs/detail/sections/CostBreakdownViewer.test.tsx@@ -1,7 +1,7 @@import React from "react";import { describe, it, expect } from "vitest";import userEvent from "@testing-library/user-event";-import { renderWithProviders, screen } from "../../../tests/test-utils";+import { renderWithProviders, screen } from "../../../../../tests/test-utils";import { CostBreakdownViewer, CostBreakdown } from "./CostBreakdownViewer";async function expandCostBreakdown() {diff --git a/ui/litellm-dashboard/src/components/view_logs/CostBreakdownViewer.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/CostBreakdownViewer.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/CostBreakdownViewer.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/CostBreakdownViewer.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/EvalViewer/EvalViewer.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/EvalViewer/EvalViewer.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/EvalViewer/EvalViewer.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/EvalViewer/EvalViewer.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/BedrockGuardrailDetails.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/BedrockGuardrailDetails.test.tsxsimilarity index 95%rename from ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/BedrockGuardrailDetails.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/BedrockGuardrailDetails.test.tsxindex a6b75499448..a7aae99c452 100644--- a/ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/BedrockGuardrailDetails.test.tsx+++ b/ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/BedrockGuardrailDetails.test.tsx@@ -2,14 +2,14 @@ import React from "react";import { describe, it, expect } from "vitest";import BedrockGuardrailDetails, {BedrockGuardrailResponse,-} from "@/components/view_logs/GuardrailViewer/BedrockGuardrailDetails";-import { renderWithProviders, screen } from "../../../../tests/test-utils";+} from "@/components/logs/detail/sections/GuardrailViewer/BedrockGuardrailDetails";+import { renderWithProviders, screen } from "../../../../../../tests/test-utils";import {makeAssessment,makeBedrockCoverage,makeBedrockResponse,makeBedrockUsage,-} from "@/components/view_logs/GuardrailViewer/__tests__/fixtures";+} from "@/components/logs/detail/sections/GuardrailViewer/__tests__/fixtures";describe("BedrockGuardrailDetails", () => {it("returns null when response is falsy", () => {diff --git a/ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/BedrockGuardrailDetails.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/BedrockGuardrailDetails.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/BedrockGuardrailDetails.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/BedrockGuardrailDetails.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/CompliancePanel.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/CompliancePanel.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/CompliancePanel.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/CompliancePanel.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/ContentFilterDetails.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/ContentFilterDetails.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/ContentFilterDetails.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/ContentFilterDetails.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/GuardrailViewer.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/GuardrailViewer.test.tsxsimilarity index 95%rename from ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/GuardrailViewer.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/GuardrailViewer.test.tsxindex ff5e736306a..62a5e61dfe3 100644--- a/ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/GuardrailViewer.test.tsx+++ b/ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/GuardrailViewer.test.tsx@@ -1,19 +1,19 @@import React from "react";import { describe, it, expect, vi, beforeEach } from "vitest";import userEvent from "@testing-library/user-event";-import { renderWithProviders, screen, waitFor, within } from "../../../../tests/test-utils";+import { renderWithProviders, screen, waitFor, within } from "../../../../../../tests/test-utils";import {GuardrailInformation,makeBedrockResponse,makeEntity,makeGuardrailInformation,-} from "@/components/view_logs/GuardrailViewer/__tests__/fixtures";-import GuardrailViewer from "@/components/view_logs/GuardrailViewer/GuardrailViewer";+} from "@/components/logs/detail/sections/GuardrailViewer/__tests__/fixtures";+import GuardrailViewer from "@/components/logs/detail/sections/GuardrailViewer/GuardrailViewer";// We will mock child components selectively for some tests to assert prop passthrough,// but also run an integration-style render without mocks.-const PresidioPath = "@/components/view_logs/GuardrailViewer/PresidioDetectedEntities";-const BedrockPath = "@/components/view_logs/GuardrailViewer/BedrockGuardrailDetails";+const PresidioPath = "@/components/logs/detail/sections/GuardrailViewer/PresidioDetectedEntities";+const BedrockPath = "@/components/logs/detail/sections/GuardrailViewer/BedrockGuardrailDetails";const skippedPreCall: Partial<GuardrailInformation> = {guardrail_status: "not_run",@@ -245,7 +245,7 @@ describe("GuardrailViewer", () => {__esModule: true,default: ({ entities }: any) => <div data-testid="presidio-mock">presidio {entities?.length}</div>,}));- const { default: Component } = await import("@/components/view_logs/GuardrailViewer/GuardrailViewer");+ const { default: Component } = await import("@/components/logs/detail/sections/GuardrailViewer/GuardrailViewer");const data = makeGuardrailInformation({guardrail_provider: undefined,@@ -264,7 +264,7 @@ describe("GuardrailViewer", () => {__esModule: true,default: ({ entities }: any) => <div data-testid="presidio-mock">count:{entities?.length}</div>,}));- const { default: Component } = await import("@/components/view_logs/GuardrailViewer/GuardrailViewer");+ const { default: Component } = await import("@/components/logs/detail/sections/GuardrailViewer/GuardrailViewer");const data = makeGuardrailInformation({guardrail_provider: "presidio",@@ -283,7 +283,7 @@ describe("GuardrailViewer", () => {__esModule: true,default: ({ response }: any) => <div data-testid="bedrock-mock">{response?.action ?? "no-action"}</div>,}));- const { default: Component } = await import("@/components/view_logs/GuardrailViewer/GuardrailViewer");+ const { default: Component } = await import("@/components/logs/detail/sections/GuardrailViewer/GuardrailViewer");const data = makeGuardrailInformation({guardrail_provider: "bedrock",diff --git a/ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/GuardrailViewer.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/GuardrailViewer.tsxsimilarity index 99%rename from ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/GuardrailViewer.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/GuardrailViewer.tsxindex 58076ef6c00..0c5ab90f454 100644--- a/ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/GuardrailViewer.tsx+++ b/ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/GuardrailViewer.tsx@@ -3,7 +3,7 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/compimport PresidioDetectedEntities from "./PresidioDetectedEntities";import BedrockGuardrailDetails, {BedrockGuardrailResponse,-} from "@/components/view_logs/GuardrailViewer/BedrockGuardrailDetails";+} from "@/components/logs/detail/sections/GuardrailViewer/BedrockGuardrailDetails";import ContentFilterDetails from "./ContentFilterDetails";import CompliancePanel from "./CompliancePanel";import { getSpendString } from "@/utils/dataUtils";diff --git a/ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/PresidioDetectedEntities.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/PresidioDetectedEntities.test.tsxsimilarity index 87%rename from ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/PresidioDetectedEntities.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/PresidioDetectedEntities.test.tsxindex 77cbe3584e1..9a31349b5bc 100644--- a/ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/PresidioDetectedEntities.test.tsx+++ b/ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/PresidioDetectedEntities.test.tsx@@ -1,9 +1,9 @@import React from "react";import { describe, it, expect } from "vitest";import userEvent from "@testing-library/user-event";-import PresidioDetectedEntities from "@/components/view_logs/GuardrailViewer/PresidioDetectedEntities";-import { renderWithProviders, screen } from "../../../../tests/test-utils";-import { makeEntity } from "@/components/view_logs/GuardrailViewer/__tests__/fixtures";+import PresidioDetectedEntities from "@/components/logs/detail/sections/GuardrailViewer/PresidioDetectedEntities";+import { renderWithProviders, screen } from "../../../../../../tests/test-utils";+import { makeEntity } from "@/components/logs/detail/sections/GuardrailViewer/__tests__/fixtures";describe("PresidioDetectedEntities", () => {it("renders null when entities empty", () => {diff --git a/ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/PresidioDetectedEntities.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/PresidioDetectedEntities.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/PresidioDetectedEntities.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/PresidioDetectedEntities.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/__tests__/fixtures.ts b/ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/__tests__/fixtures.tssimilarity index 97%rename from ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/__tests__/fixtures.tsrename to ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/__tests__/fixtures.tsindex ab121adf6b4..6511d4babd6 100644--- a/ui/litellm-dashboard/src/components/view_logs/GuardrailViewer/__tests__/fixtures.ts+++ b/ui/litellm-dashboard/src/components/logs/detail/sections/GuardrailViewer/__tests__/fixtures.ts@@ -3,7 +3,7 @@ import type {BedrockAssessment,BedrockGuardrailCoverage,BedrockGuardrailUsage,-} from "@/components/view_logs/GuardrailViewer/BedrockGuardrailDetails";+} from "@/components/logs/detail/sections/GuardrailViewer/BedrockGuardrailDetails";export interface RecognitionMetadata {recognizer_name: string;diff --git a/ui/litellm-dashboard/src/components/view_logs/ToolsSection/FormattedToolView.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/FormattedToolView.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/ToolsSection/FormattedToolView.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/FormattedToolView.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/ToolsSection/JsonToolView.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/JsonToolView.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/ToolsSection/JsonToolView.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/JsonToolView.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/ToolsSection/ToolExpandedContent.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/ToolExpandedContent.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/ToolsSection/ToolExpandedContent.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/ToolExpandedContent.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/ToolsSection/ToolItem.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/ToolItem.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/ToolsSection/ToolItem.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/ToolItem.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/ToolsSection/ToolsSection.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/ToolsSection.test.tsxsimilarity index 99%rename from ui/litellm-dashboard/src/components/view_logs/ToolsSection/ToolsSection.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/ToolsSection.test.tsxindex e146f38b42b..5885a5b736d 100644--- a/ui/litellm-dashboard/src/components/view_logs/ToolsSection/ToolsSection.test.tsx+++ b/ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/ToolsSection.test.tsx@@ -7,7 +7,7 @@ import userEvent from "@testing-library/user-event";import { describe, it, expect } from "vitest";import { parseToolsFromLog } from "./utils";import { ToolsSection } from "./ToolsSection";-import { LogEntry } from "../columns";+import { LogEntry } from "../../../types";const logWithTools = (toolNames: string[], calledName?: string): LogEntry => ({request_id: "render-1",diff --git a/ui/litellm-dashboard/src/components/view_logs/ToolsSection/ToolsSection.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/ToolsSection.tsxsimilarity index 98%rename from ui/litellm-dashboard/src/components/view_logs/ToolsSection/ToolsSection.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/ToolsSection.tsxindex e3965f182fd..a5ee65ceaa1 100644--- a/ui/litellm-dashboard/src/components/view_logs/ToolsSection/ToolsSection.tsx+++ b/ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/ToolsSection.tsx@@ -6,7 +6,7 @@import { useState } from "react";import { ChevronDown, ChevronRight } from "lucide-react";import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";-import { LogEntry } from "../columns";+import { LogEntry } from "../../../types";import { parseToolsFromLog } from "./utils";import { ToolItem } from "./ToolItem";diff --git a/ui/litellm-dashboard/src/components/view_logs/ToolsSection/index.ts b/ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/index.tssimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/ToolsSection/index.tsrename to ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/index.tsdiff --git a/ui/litellm-dashboard/src/components/view_logs/ToolsSection/types.ts b/ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/types.tssimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/ToolsSection/types.tsrename to ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/types.tsdiff --git a/ui/litellm-dashboard/src/components/view_logs/ToolsSection/utils.test.ts b/ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/utils.test.tssimilarity index 99%rename from ui/litellm-dashboard/src/components/view_logs/ToolsSection/utils.test.tsrename to ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/utils.test.tsindex b3c118ef368..78372fe56d9 100644--- a/ui/litellm-dashboard/src/components/view_logs/ToolsSection/utils.test.ts+++ b/ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/utils.test.ts@@ -4,7 +4,7 @@import { describe, it, expect } from "vitest";import { parseToolsFromLog, hasTools } from "./utils";-import { LogEntry } from "../columns";+import { LogEntry } from "../../../types";describe("ToolsSection utils", () => {describe("parseToolsFromLog", () => {diff --git a/ui/litellm-dashboard/src/components/view_logs/ToolsSection/utils.ts b/ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/utils.tssimilarity index 99%rename from ui/litellm-dashboard/src/components/view_logs/ToolsSection/utils.tsrename to ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/utils.tsindex d1d1698232a..5e76a09c155 100644--- a/ui/litellm-dashboard/src/components/view_logs/ToolsSection/utils.ts+++ b/ui/litellm-dashboard/src/components/logs/detail/sections/ToolsSection/utils.ts@@ -2,7 +2,7 @@* Utility functions for parsing and processing tool data from log entries*/-import { LogEntry } from "../columns";+import { LogEntry } from "../../../types";import { ParsedTool, ToolDefinition, ToolCall } from "./types";/**diff --git a/ui/litellm-dashboard/src/components/view_logs/VectorStoreViewer.tsx b/ui/litellm-dashboard/src/components/logs/detail/sections/VectorStoreViewer.tsxsimilarity index 98%rename from ui/litellm-dashboard/src/components/view_logs/VectorStoreViewer.tsxrename to ui/litellm-dashboard/src/components/logs/detail/sections/VectorStoreViewer.tsxindex 8480a123373..6b560acb90c 100644--- a/ui/litellm-dashboard/src/components/view_logs/VectorStoreViewer.tsx+++ b/ui/litellm-dashboard/src/components/logs/detail/sections/VectorStoreViewer.tsx@@ -1,7 +1,7 @@import React, { useState } from "react";import { ChevronDown, ChevronRight } from "lucide-react";import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";-import { getProviderLogoAndName } from "../provider_info_helpers";+import { getProviderLogoAndName } from "../../../provider_info_helpers";interface VectorStoreContent {text: string;diff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/useKeyboardNavigation.test.tsx b/ui/litellm-dashboard/src/components/logs/detail/useKeyboardNavigation.test.tsxsimilarity index 95%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/useKeyboardNavigation.test.tsxrename to ui/litellm-dashboard/src/components/logs/detail/useKeyboardNavigation.test.tsxindex aec56296917..dfc527a6b0d 100644--- a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/useKeyboardNavigation.test.tsx+++ b/ui/litellm-dashboard/src/components/logs/detail/useKeyboardNavigation.test.tsx@@ -1,6 +1,6 @@import { fireEvent, renderHook } from "@testing-library/react";import { describe, expect, it, vi } from "vitest";-import type { LogEntry } from "../columns";+import type { LogEntry } from "../types";import { useKeyboardNavigation } from "./useKeyboardNavigation";const logs = [{ request_id: "first" }, { request_id: "second" }] as LogEntry[];diff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/useKeyboardNavigation.ts b/ui/litellm-dashboard/src/components/logs/detail/useKeyboardNavigation.tssimilarity index 96%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/useKeyboardNavigation.tsrename to ui/litellm-dashboard/src/components/logs/detail/useKeyboardNavigation.tsindex 6d30b75f312..b8f1c037cc0 100644--- a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/useKeyboardNavigation.ts+++ b/ui/litellm-dashboard/src/components/logs/detail/useKeyboardNavigation.ts@@ -1,6 +1,6 @@import { useShortcut } from "@/components/shared/useShortcut";-import { LogEntry } from "../columns";+import { LogEntry } from "../types";interface UseKeyboardNavigationProps {isOpen: boolean;diff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/utils.test.ts b/ui/litellm-dashboard/src/components/logs/detail/utils.test.tssimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/utils.test.tsrename to ui/litellm-dashboard/src/components/logs/detail/utils.test.tsdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/utils.ts b/ui/litellm-dashboard/src/components/logs/detail/utils.tssimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/utils.tsrename to ui/litellm-dashboard/src/components/logs/detail/utils.tsdiff --git a/ui/litellm-dashboard/src/components/view_logs/LogsTableToolbar.tsx b/ui/litellm-dashboard/src/components/logs/request/LogsTableToolbar.tsxsimilarity index 97%rename from ui/litellm-dashboard/src/components/view_logs/LogsTableToolbar.tsxrename to ui/litellm-dashboard/src/components/logs/request/LogsTableToolbar.tsxindex 3496b709d9b..4705a9057f5 100644--- a/ui/litellm-dashboard/src/components/view_logs/LogsTableToolbar.tsx+++ b/ui/litellm-dashboard/src/components/logs/request/LogsTableToolbar.tsx@@ -10,8 +10,8 @@ import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popoverimport { Switch } from "@/components/ui/switch";import { cn } from "@/lib/cva.config";-import { QUICK_SELECT_OPTIONS } from "./constants";-import { getTimeRangeDisplay } from "./logs_utils";+import { QUICK_SELECT_OPTIONS } from "../constants";+import { getTimeRangeDisplay } from "./timeRange";const DATETIME_LOCAL_FORMAT = "YYYY-MM-DDTHH:mm";diff --git a/ui/litellm-dashboard/src/components/view_logs/RequestLogsFilters.test.tsx b/ui/litellm-dashboard/src/components/logs/request/RequestLogsFilters.test.tsxsimilarity index 99%rename from ui/litellm-dashboard/src/components/view_logs/RequestLogsFilters.test.tsxrename to ui/litellm-dashboard/src/components/logs/request/RequestLogsFilters.test.tsxindex 38542f033dc..f13e24b268a 100644--- a/ui/litellm-dashboard/src/components/view_logs/RequestLogsFilters.test.tsx+++ b/ui/litellm-dashboard/src/components/logs/request/RequestLogsFilters.test.tsx@@ -3,9 +3,9 @@ import userEvent from "@testing-library/user-event";import { useState } from "react";import { beforeEach, describe, expect, it, vi } from "vitest";-import { chooseSelectOption, renderWithProviders, testQueryClient } from "../../../tests/test-utils";-import { ERROR_CODE_OPTIONS } from "./constants";-import { LOG_FILTER_IDS } from "./log_filter_logic";+import { chooseSelectOption, renderWithProviders, testQueryClient } from "../../../../tests/test-utils";+import { ERROR_CODE_OPTIONS } from "../constants";+import { LOG_FILTER_IDS } from "./useLogFilterLogic";import { RequestLogsFilters } from "./RequestLogsFilters";vi.mock("@/app/(dashboard)/hooks/keys/useKeyAliases", () => ({diff --git a/ui/litellm-dashboard/src/components/view_logs/RequestLogsFilters.tsx b/ui/litellm-dashboard/src/components/logs/request/RequestLogsFilters.tsxsimilarity index 98%rename from ui/litellm-dashboard/src/components/view_logs/RequestLogsFilters.tsxrename to ui/litellm-dashboard/src/components/logs/request/RequestLogsFilters.tsxindex e0c3205c80f..2bf893820ce 100644--- a/ui/litellm-dashboard/src/components/view_logs/RequestLogsFilters.tsx+++ b/ui/litellm-dashboard/src/components/logs/request/RequestLogsFilters.tsx@@ -20,9 +20,9 @@ import {import { Input } from "@/components/ui/input";import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";-import type { Team } from "../key_team_helpers/key_list";-import { CREDENTIAL_LABELS, ERROR_CODE_OPTIONS } from "./constants";-import { LOG_FILTER_IDS, type LogsWindow } from "./log_filter_logic";+import type { Team } from "../../key_team_helpers/key_list";+import { CREDENTIAL_LABELS, ERROR_CODE_OPTIONS } from "../constants";+import { LOG_FILTER_IDS, type LogsWindow } from "./useLogFilterLogic";const ALL_VALUE = "all";diff --git a/ui/litellm-dashboard/src/components/view_logs/RequestLogsPanel.test.tsx b/ui/litellm-dashboard/src/components/logs/request/RequestLogsPanel.test.tsxsimilarity index 99%rename from ui/litellm-dashboard/src/components/view_logs/RequestLogsPanel.test.tsxrename to ui/litellm-dashboard/src/components/logs/request/RequestLogsPanel.test.tsxindex aefbf68d662..d950859f22e 100644--- a/ui/litellm-dashboard/src/components/view_logs/RequestLogsPanel.test.tsx+++ b/ui/litellm-dashboard/src/components/logs/request/RequestLogsPanel.test.tsx@@ -5,12 +5,12 @@ import moment from "moment";import { NuqsTestingAdapter, type UrlUpdateEvent } from "nuqs/adapters/testing";import { beforeEach, describe, expect, it, vi } from "vitest";-import { render, renderWithProviders, testQueryClient } from "../../../tests/test-utils";-import type { LogEntry } from "./columns";+import { render, renderWithProviders, testQueryClient } from "../../../../tests/test-utils";+import type { LogEntry } from "../types";import RequestLogsPanel from "./RequestLogsPanel";-vi.mock("../networking", async (importOriginal) => {- const actual = await importOriginal<typeof import("../networking")>();+vi.mock("../../networking", async (importOriginal) => {+ const actual = await importOriginal<typeof import("../../networking")>();return {...actual,uiSpendLogsCall: vi.fn(),@@ -22,7 +22,7 @@ vi.mock("@/components/key_team_helpers/filter_helpers", () => ({fetchAllTeams: vi.fn().mockResolvedValue([]),}));-vi.mock("./LogDetailsDrawer", () => ({+vi.mock("../detail", () => ({LogDetailsDrawer: function LogDetailsDrawerMock({open,logEntry,@@ -61,7 +61,7 @@ vi.mock("@tanstack/react-pacer/debouncer", () => ({import { useDebouncedValue } from "@tanstack/react-pacer/debouncer";import { DEBOUNCE_WAIT_MS } from "@/utils/debounceConstants";-import { uiSpendLogsCall } from "../networking";+import { uiSpendLogsCall } from "../../networking";const logEntry = (overrides: Partial<LogEntry>): LogEntry => ({request_id: "req-1",diff --git a/ui/litellm-dashboard/src/components/view_logs/RequestLogsPanel.tsx b/ui/litellm-dashboard/src/components/logs/request/RequestLogsPanel.tsxsimilarity index 97%rename from ui/litellm-dashboard/src/components/view_logs/RequestLogsPanel.tsxrename to ui/litellm-dashboard/src/components/logs/request/RequestLogsPanel.tsxindex ff26e30baca..605ff373c7c 100644--- a/ui/litellm-dashboard/src/components/view_logs/RequestLogsPanel.tsx+++ b/ui/litellm-dashboard/src/components/logs/request/RequestLogsPanel.tsx@@ -10,10 +10,10 @@ import { DEFAULT_PAGE_SIZE_OPTIONS } from "@/components/shared/DataTable";import { Button } from "@/components/ui/button";import { AutoRouterModelGroupsProvider } from "@/components/shared/table_cells";import { DEBOUNCE_WAIT_MS } from "@/utils/debounceConstants";-import type { KeyResponse } from "../key_team_helpers/key_list";-import { keyInfoV1Call, uiSpendLogsCall } from "../networking";-import KeyInfoView from "../templates/key_info_view";-import type { LogEntry } from "./columns";+import type { KeyResponse } from "../../key_team_helpers/key_list";+import { keyInfoV1Call, uiSpendLogsCall } from "../../networking";+import KeyInfoView from "../../templates/key_info_view";+import type { LogEntry } from "../types";import {DEFAULT_LOGS_SORTING,formatLogsWindow,@@ -21,9 +21,9 @@ import {LOG_FILTER_IDS,type PaginatedResponse,useLogFilterLogic,-} from "./log_filter_logic";+} from "./useLogFilterLogic";import { useLogDetailRouting } from "./logDetailRouting";-import { LogDetailsDrawer } from "./LogDetailsDrawer";+import { LogDetailsDrawer } from "../detail";import {defaultLogsTimeRange,type LogsTimeRange,diff --git a/ui/litellm-dashboard/src/components/view_logs/RequestLogsTable.tsx b/ui/litellm-dashboard/src/components/logs/request/RequestLogsTable.tsxsimilarity index 96%rename from ui/litellm-dashboard/src/components/view_logs/RequestLogsTable.tsxrename to ui/litellm-dashboard/src/components/logs/request/RequestLogsTable.tsxindex 0b834f43e40..822bf73302b 100644--- a/ui/litellm-dashboard/src/components/view_logs/RequestLogsTable.tsx+++ b/ui/litellm-dashboard/src/components/logs/request/RequestLogsTable.tsx@@ -7,10 +7,10 @@ import { useMemo, useState, type ReactNode } from "react";import { useUserEmailLookup } from "@/app/(dashboard)/hooks/users/useUsers";import { DataTable, DataTableFilterDrawer, DataTableToolbar } from "@/components/shared/DataTable";-import type { Team } from "../key_team_helpers/key_list";-import type { LogEntry } from "./columns";-import { CREDENTIAL_LABELS, SPAN_TYPE_LABELS } from "./constants";-import { LOG_FILTER_IDS, LOG_FILTER_LABELS, type LogsWindow } from "./log_filter_logic";+import type { Team } from "../../key_team_helpers/key_list";+import type { LogEntry } from "../types";+import { CREDENTIAL_LABELS, SPAN_TYPE_LABELS } from "../constants";+import { LOG_FILTER_IDS, LOG_FILTER_LABELS, type LogsWindow } from "./useLogFilterLogic";import { RequestLogsFilters } from "./RequestLogsFilters";import { getRequestLogsTableColumns } from "./RequestLogsTableColumns";diff --git a/ui/litellm-dashboard/src/components/view_logs/RequestLogsTableColumns.test.tsx b/ui/litellm-dashboard/src/components/logs/request/RequestLogsTableColumns.test.tsxsimilarity index 99%rename from ui/litellm-dashboard/src/components/view_logs/RequestLogsTableColumns.test.tsxrename to ui/litellm-dashboard/src/components/logs/request/RequestLogsTableColumns.test.tsxindex c6c2714bc49..6d4a6e789b4 100644--- a/ui/litellm-dashboard/src/components/view_logs/RequestLogsTableColumns.test.tsx+++ b/ui/litellm-dashboard/src/components/logs/request/RequestLogsTableColumns.test.tsx@@ -4,7 +4,7 @@ import { describe, expect, it, vi } from "vitest";import { DataTable } from "@/components/shared/DataTable";-import type { LogEntry } from "./columns";+import type { LogEntry } from "../types";import { getRequestLogsTableColumns } from "./RequestLogsTableColumns";const { copyToClipboardMock } = vi.hoisted(() => ({ copyToClipboardMock: vi.fn() }));diff --git a/ui/litellm-dashboard/src/components/view_logs/RequestLogsTableColumns.tsx b/ui/litellm-dashboard/src/components/logs/request/RequestLogsTableColumns.tsxsimilarity index 98%rename from ui/litellm-dashboard/src/components/view_logs/RequestLogsTableColumns.tsxrename to ui/litellm-dashboard/src/components/logs/request/RequestLogsTableColumns.tsxindex 80e7b512471..5d5918e4657 100644--- a/ui/litellm-dashboard/src/components/view_logs/RequestLogsTableColumns.tsx+++ b/ui/litellm-dashboard/src/components/logs/request/RequestLogsTableColumns.tsx@@ -7,10 +7,10 @@ import { DataTableSortHeader } from "@/components/shared/DataTable";import { CellTooltip, DateCell, IdCell, MoneyCell, StatusBadge } from "@/components/shared/table_cells";import { copyToClipboard, getSpendString } from "@/utils/dataUtils";-import { getProviderLogoAndName } from "../provider_info_helpers";-import { getBatchIdFromRequestId, getBatchRequestCounts, isBatchCallType } from "./batchLogUtils";-import type { LogEntry } from "./columns";-import { AGENT_CALL_TYPES, MCP_CALL_TYPES } from "./constants";+import { getProviderLogoAndName } from "../../provider_info_helpers";+import { getBatchIdFromRequestId, getBatchRequestCounts, isBatchCallType } from "../batchLogUtils";+import type { LogEntry } from "../types";+import { AGENT_CALL_TYPES, MCP_CALL_TYPES } from "../constants";import { AgentBadge, AgentIcon, BatchBadge, LlmBadge, McpBadge, SparkleIcon, WrenchIcon } from "./TypeBadges";export interface RequestLogsTableColumnsDeps {diff --git a/ui/litellm-dashboard/src/components/view_logs/TypeBadges.test.tsx b/ui/litellm-dashboard/src/components/logs/request/TypeBadges.test.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/TypeBadges.test.tsxrename to ui/litellm-dashboard/src/components/logs/request/TypeBadges.test.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/TypeBadges.tsx b/ui/litellm-dashboard/src/components/logs/request/TypeBadges.tsxsimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/TypeBadges.tsxrename to ui/litellm-dashboard/src/components/logs/request/TypeBadges.tsxdiff --git a/ui/litellm-dashboard/src/components/view_logs/logDetailRouting.ts b/ui/litellm-dashboard/src/components/logs/request/logDetailRouting.tssimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/logDetailRouting.tsrename to ui/litellm-dashboard/src/components/logs/request/logDetailRouting.tsdiff --git a/ui/litellm-dashboard/src/components/view_logs/logs_utils.test.tsx b/ui/litellm-dashboard/src/components/logs/request/timeRange.test.tssimilarity index 97%rename from ui/litellm-dashboard/src/components/view_logs/logs_utils.test.tsxrename to ui/litellm-dashboard/src/components/logs/request/timeRange.test.tsindex b0b74df4c24..69f4f914e7d 100644--- a/ui/litellm-dashboard/src/components/view_logs/logs_utils.test.tsx+++ b/ui/litellm-dashboard/src/components/logs/request/timeRange.test.ts@@ -1,6 +1,6 @@import moment from "moment";import { describe, expect, it } from "vitest";-import { getTimeRangeDisplay } from "./logs_utils";+import { getTimeRangeDisplay } from "./timeRange";// startTime built relative to "now"; getTimeRangeDisplay computes now() internally.const ago = (amount: number, unit: moment.unitOfTime.DurationConstructor) =>diff --git a/ui/litellm-dashboard/src/components/view_logs/logs_utils.tsx b/ui/litellm-dashboard/src/components/logs/request/timeRange.tssimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/logs_utils.tsxrename to ui/litellm-dashboard/src/components/logs/request/timeRange.tsdiff --git a/ui/litellm-dashboard/src/components/view_logs/log_filter_logic.test.tsx b/ui/litellm-dashboard/src/components/logs/request/useLogFilterLogic.test.tsxsimilarity index 98%rename from ui/litellm-dashboard/src/components/view_logs/log_filter_logic.test.tsxrename to ui/litellm-dashboard/src/components/logs/request/useLogFilterLogic.test.tsxindex baf713b1537..9c266759f53 100644--- a/ui/litellm-dashboard/src/components/view_logs/log_filter_logic.test.tsx+++ b/ui/litellm-dashboard/src/components/logs/request/useLogFilterLogic.test.tsx@@ -15,9 +15,9 @@ import {LOGS_WINDOW_TICK_MS,useLogFilterLogic,type PaginatedResponse,-} from "./log_filter_logic";+} from "./useLogFilterLogic";-vi.mock("../networking", () => ({+vi.mock("../../networking", () => ({uiSpendLogsCall: vi.fn(),}));@@ -25,9 +25,9 @@ vi.mock("@/components/key_team_helpers/filter_helpers", () => ({fetchAllTeams: vi.fn().mockResolvedValue([]),}));-import { uiSpendLogsCall } from "../networking";+import { uiSpendLogsCall } from "../../networking";import { fetchAllTeams } from "@/components/key_team_helpers/filter_helpers";-import type { Team } from "../key_team_helpers/key_list";+import type { Team } from "../../key_team_helpers/key_list";const emptyResponse: PaginatedResponse = {data: [],diff --git a/ui/litellm-dashboard/src/components/view_logs/log_filter_logic.tsx b/ui/litellm-dashboard/src/components/logs/request/useLogFilterLogic.tssimilarity index 96%rename from ui/litellm-dashboard/src/components/view_logs/log_filter_logic.tsxrename to ui/litellm-dashboard/src/components/logs/request/useLogFilterLogic.tsindex 8b2d9f22c15..17d7eb4b860 100644--- a/ui/litellm-dashboard/src/components/view_logs/log_filter_logic.tsx+++ b/ui/litellm-dashboard/src/components/logs/request/useLogFilterLogic.ts@@ -1,12 +1,12 @@import moment from "moment";import { keepPreviousData, useQuery, type UseQueryOptions } from "@tanstack/react-query";import type { ColumnFiltersState, PaginationState, SortingState } from "@tanstack/react-table";-import { uiSpendLogsCall } from "../networking";-import { Team } from "../key_team_helpers/key_list";-import { fetchAllTeams } from "../../components/key_team_helpers/filter_helpers";-import { teamListScopeUserId } from "../../utils/roles";-import { defaultPageSize } from "../constants";-import { LOGS_SORT_FIELD_MAP, type LogEntry, type LogsSortField } from "./columns";+import { uiSpendLogsCall } from "../../networking";+import { Team } from "../../key_team_helpers/key_list";+import { fetchAllTeams } from "../../key_team_helpers/filter_helpers";+import { teamListScopeUserId } from "../../../utils/roles";+import { defaultPageSize } from "../../constants";+import { LOGS_SORT_FIELD_MAP, type LogEntry, type LogsSortField } from "../types";export interface PaginatedResponse {data: LogEntry[];diff --git a/ui/litellm-dashboard/src/components/view_logs/columns.tsx b/ui/litellm-dashboard/src/components/logs/types.tssimilarity index 100%rename from ui/litellm-dashboard/src/components/view_logs/columns.tsxrename to ui/litellm-dashboard/src/components/logs/types.tsdiff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsxindex c297ca72141..98f3a120a49 100644--- a/ui/litellm-dashboard/src/components/networking.tsx+++ b/ui/litellm-dashboard/src/components/networking.tsx@@ -116,7 +116,7 @@ import { MCP_TOOLS_PREVIEW_FORBIDDEN_MESSAGE } from "./mcp_tools/constants";import type { ComplexityRouterConfigPayload } from "./add_model/build_complexity_router_config";import type { AutoRouterPresetsResponse } from "@/lib/autorouter_presets";import type { VectorStoreIndex } from "@/app/(dashboard)/vector-stores/_components/IndexesTab";-import type { RoutingDecision } from "./view_logs/LogDetailsDrawer/RoutingDecisionCard";+import type { RoutingDecision } from "./logs/detail/RoutingDecisionCard";import type { SpanDetail, SpanErrorPage, Trace, TracePage } from "./lens/traces/types";import {createApiClient,diff --git a/ui/litellm-dashboard/tests/CreateKeyPage.expiredToken.test.tsx b/ui/litellm-dashboard/tests/CreateKeyPage.expiredToken.test.tsxindex 6a4fa2e32c3..2c57833102d 100644--- a/ui/litellm-dashboard/tests/CreateKeyPage.expiredToken.test.tsx+++ b/ui/litellm-dashboard/tests/CreateKeyPage.expiredToken.test.tsx@@ -119,7 +119,7 @@ vi.mock("@/app/(dashboard)/router-settings/_components/general_settings", () =>}));vi.mock("@/components/pass_through_settings", () => ({ default: stub("pass-through-settings") }));vi.mock("@/components/budgets/budget_panel", () => ({ default: stub("budget-panel") }));-vi.mock("@/components/view_logs", () => ({ default: stub("spend-logs") }));+vi.mock("@/components/logs", () => ({ default: stub("spend-logs") }));vi.mock("@/components/model_hub_table", () => ({ default: stub("model-hub-table") }));vi.mock("@/components/new_usage", () => ({ default: stub("new-usage") }));vi.mock("@/components/api_ref", () => ({ default: stub("api-ref") }));