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]

renamed (console), added use clients

Achintya Rajanf4d9e4869ad7
diff --git a/ui/litellm-dashboard/src/app/(console)/components/Sidebar2.tsx b/ui/litellm-dashboard/src/app/dashboard/components/Sidebar2.tsx
similarity index 99%
rename from ui/litellm-dashboard/src/app/(console)/components/Sidebar2.tsx
rename to ui/litellm-dashboard/src/app/dashboard/components/Sidebar2.tsx
index b2477243a0e..9de9f2f1368 100644
--- a/ui/litellm-dashboard/src/app/(console)/components/Sidebar2.tsx
+++ b/ui/litellm-dashboard/src/app/dashboard/components/Sidebar2.tsx
@@ -1,3 +1,5 @@
+"use client";
+
import React from "react";
import Link from "next/link";
import { usePathname, useSearchParams } from "next/navigation";
@@ -216,7 +218,7 @@ const Sidebar2: React.FC<SidebarProps> = ({ accessToken, userRole, defaultSelect
};
const selectedMenuKey =
- pathname === "/virtual-keys"
+ pathname === "/dashboard/virtual-keys"
? "1"
: pageParam
? findMenuItemKey(pageParam)
diff --git a/ui/litellm-dashboard/src/app/(console)/components/SidebarProvider.tsx b/ui/litellm-dashboard/src/app/dashboard/components/SidebarProvider.tsx
similarity index 82%
rename from ui/litellm-dashboard/src/app/(console)/components/SidebarProvider.tsx
rename to ui/litellm-dashboard/src/app/dashboard/components/SidebarProvider.tsx
index a5e150da86c..83804937986 100644
--- a/ui/litellm-dashboard/src/app/(console)/components/SidebarProvider.tsx
+++ b/ui/litellm-dashboard/src/app/dashboard/components/SidebarProvider.tsx
@@ -1,8 +1,10 @@
-import Sidebar2 from "@/app/(console)/components/Sidebar2";
+"use client";
+
+import Sidebar2 from "@/app/dashboard/components/Sidebar2";
import Sidebar from "@/components/leftnav";
import React from "react";
import useFeatureFlags from "@/hooks/useFeatureFlags";
-import useAuthorized from "@/app/(console)/hooks/useAuthorized";
+import useAuthorized from "@/app/dashboard/hooks/useAuthorized";
interface SidebarProviderProps {
defaultSelectedKey: string;
diff --git a/ui/litellm-dashboard/src/app/(console)/components/modals/CreateUserModal.tsx b/ui/litellm-dashboard/src/app/dashboard/components/modals/CreateUserModal.tsx
similarity index 98%
rename from ui/litellm-dashboard/src/app/(console)/components/modals/CreateUserModal.tsx
rename to ui/litellm-dashboard/src/app/dashboard/components/modals/CreateUserModal.tsx
index 4caaceb662f..8b16074b25d 100644
--- a/ui/litellm-dashboard/src/app/(console)/components/modals/CreateUserModal.tsx
+++ b/ui/litellm-dashboard/src/app/dashboard/components/modals/CreateUserModal.tsx
@@ -1,3 +1,5 @@
+"use client";
+
// TODO: refactor
import React, { useState, useEffect } from "react";
import { Button, Modal, Form, Input, message, Select, InputNumber, Select as Select2 } from "antd";
@@ -27,9 +29,9 @@ import {
} from "@/components/networking";
import { getModelDisplayName } from "@/components/key_team_helpers/fetch_available_models_team_key";
import BulkCreateUsersButton from "@/components/bulk_create_users_button";
-import { fetchTeams } from "@/app/(console)/virtual-keys/networking";
-import useTeams from "@/app/(console)/virtual-keys/hooks/useTeams";
-import useAuthorized from "@/app/(console)/hooks/useAuthorized";
+import { fetchTeams } from "@/app/dashboard/virtual-keys/networking";
+import useTeams from "@/app/dashboard/virtual-keys/hooks/useTeams";
+import useAuthorized from "@/app/dashboard/hooks/useAuthorized";
// Helper function to generate UUID compatible across all environments
const generateUUID = (): string => {
diff --git a/ui/litellm-dashboard/src/app/(console)/hooks/useAuthorized.ts b/ui/litellm-dashboard/src/app/dashboard/hooks/useAuthorized.ts
similarity index 94%
rename from ui/litellm-dashboard/src/app/(console)/hooks/useAuthorized.ts
rename to ui/litellm-dashboard/src/app/dashboard/hooks/useAuthorized.ts
index 45f5ee92ea6..9d436d0566f 100644
--- a/ui/litellm-dashboard/src/app/(console)/hooks/useAuthorized.ts
+++ b/ui/litellm-dashboard/src/app/dashboard/hooks/useAuthorized.ts
@@ -1,4 +1,5 @@
-import { Router } from "next/router";
+"use client";
+
import { getCookie } from "@/utils/cookieUtils";
import { useRouter } from "next/navigation";
import { jwtDecode } from "jwt-decode";
diff --git a/ui/litellm-dashboard/src/app/(console)/layout.tsx b/ui/litellm-dashboard/src/app/dashboard/layout.tsx
similarity index 86%
rename from ui/litellm-dashboard/src/app/(console)/layout.tsx
rename to ui/litellm-dashboard/src/app/dashboard/layout.tsx
index 595eeedc596..851ecec6654 100644
--- a/ui/litellm-dashboard/src/app/(console)/layout.tsx
+++ b/ui/litellm-dashboard/src/app/dashboard/layout.tsx
@@ -3,9 +3,8 @@
import React from "react";
import Navbar from "@/components/navbar";
import { ThemeProvider } from "@/contexts/ThemeContext";
-import Sidebar2 from "@/app/(console)/components/Sidebar2";
-import useAuthorized from "@/app/(console)/hooks/useAuthorized";
-import useFeatureFlags, { FeatureFlagsProvider } from "@/hooks/useFeatureFlags";
+import Sidebar2 from "@/app/dashboard/components/Sidebar2";
+import useAuthorized from "@/app/dashboard/hooks/useAuthorized";
export default function Layout({ children }: { children: React.ReactNode }) {
const { accessToken, userRole } = useAuthorized();
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKey.tsx b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKey.tsx
similarity index 94%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKey.tsx
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKey.tsx
index c8e0b1d8ce5..15dd7139174 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKey.tsx
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKey.tsx
@@ -6,9 +6,9 @@ import { Modal, Form } from "antd";
import { getPossibleUserRoles, Organization } from "@/components/networking";
import { rolesWithWriteAccess } from "@/utils/roles";
import { Team } from "@/components/key_team_helpers/key_list";
-import CreateKeyModal from "@/app/(console)/virtual-keys/components/CreateKeyModal/CreateKeyModal";
-import CreateUserModal from "@/app/(console)/components/modals/CreateUserModal";
-import useAuthorized from "@/app/(console)/hooks/useAuthorized";
+import CreateKeyModal from "@/app/dashboard/virtual-keys/components/CreateKeyModal/CreateKeyModal";
+import CreateUserModal from "@/app/dashboard/components/modals/CreateUserModal";
+import useAuthorized from "@/app/dashboard/hooks/useAuthorized";
interface CreateKeyProps {
team: Team | null;
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/CreateKeyForm/KeyDetailsSection.tsx b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/CreateKeyForm/KeyDetailsSection.tsx
similarity index 99%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/CreateKeyForm/KeyDetailsSection.tsx
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/CreateKeyForm/KeyDetailsSection.tsx
index 54e9aaefed7..33a8ae06cf9 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/CreateKeyForm/KeyDetailsSection.tsx
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/CreateKeyForm/KeyDetailsSection.tsx
@@ -1,3 +1,5 @@
+"use client";
+
import { TextInput, Title } from "@tremor/react";
import { Form, FormInstance, Select, Tooltip } from "antd";
import { InfoCircleOutlined } from "@ant-design/icons";
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/CreateKeyForm/OptionalSettingsSection.tsx b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/CreateKeyForm/OptionalSettingsSection.tsx
similarity index 99%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/CreateKeyForm/OptionalSettingsSection.tsx
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/CreateKeyForm/OptionalSettingsSection.tsx
index c879cdf5955..65ebd2d5717 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/CreateKeyForm/OptionalSettingsSection.tsx
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/CreateKeyForm/OptionalSettingsSection.tsx
@@ -1,3 +1,5 @@
+"use client";
+
import { Accordion, AccordionBody, AccordionHeader, Text, Title } from "@tremor/react";
import { Form, FormInstance, Input, Select, Tooltip } from "antd";
import { InfoCircleOutlined } from "@ant-design/icons";
@@ -15,7 +17,7 @@ import SchemaFormFields from "@/components/common_components/check_openapi_schem
import { Team } from "@/components/key_team_helpers/key_list";
import React from "react";
import { DefaultOptionType } from "rc-select/lib/Select";
-import { ModelAliases } from "@/app/(console)/virtual-keys/components/CreateKeyModal/types";
+import { ModelAliases } from "@/app/dashboard/virtual-keys/components/CreateKeyModal/types";
export interface OptionalSettingsSectionProps {
form: FormInstance;
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/CreateKeyForm/OwnershipSection.tsx b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/CreateKeyForm/OwnershipSection.tsx
similarity index 98%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/CreateKeyForm/OwnershipSection.tsx
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/CreateKeyForm/OwnershipSection.tsx
index fdfb3893f69..00c2e9a1e2b 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/CreateKeyForm/OwnershipSection.tsx
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/CreateKeyForm/OwnershipSection.tsx
@@ -1,10 +1,12 @@
+"use client";
+
import { Button as Button2, Form, Radio, Select, Tooltip } from "antd";
import { Title } from "@tremor/react";
import { InfoCircleOutlined } from "@ant-design/icons";
import TeamDropdown from "@/components/common_components/team_dropdown";
import React from "react";
import { Team } from "@/components/key_team_helpers/key_list";
-import { UserOption } from "@/app/(console)/virtual-keys/components/CreateKeyModal/types";
+import { UserOption } from "@/app/dashboard/virtual-keys/components/CreateKeyModal/types";
interface OwnershipSectionProps {
team: Team | null;
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/CreateKeyModal.tsx b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/CreateKeyModal.tsx
similarity index 91%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/CreateKeyModal.tsx
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/CreateKeyModal.tsx
index 9f4d7528a8f..2bee7f72b14 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/CreateKeyModal.tsx
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/CreateKeyModal.tsx
@@ -1,9 +1,11 @@
+"use client";
+
import { Button as Button2, Form, FormInstance, Modal } from "antd";
import { Text } from "@tremor/react";
import { keyCreateCall, keyCreateServiceAccountCall } from "@/components/networking";
import React, { useEffect, useState } from "react";
import { Team } from "@/components/key_team_helpers/key_list";
-import SaveKeyModal from "@/app/(console)/virtual-keys/components/SaveKeyModal";
+import SaveKeyModal from "@/app/dashboard/virtual-keys/components/SaveKeyModal";
import NotificationsManager from "@/components/molecules/notifications_manager";
import {
useGuardrailsAndPrompts,
@@ -11,15 +13,15 @@ import {
useTeamModels,
useUserModels,
useUserSearch,
-} from "@/app/(console)/virtual-keys/components/CreateKeyModal/hooks";
-import OwnershipSection from "@/app/(console)/virtual-keys/components/CreateKeyModal/CreateKeyForm/OwnershipSection";
-import KeyDetailsSection from "@/app/(console)/virtual-keys/components/CreateKeyModal/CreateKeyForm/KeyDetailsSection";
-import OptionalSettingsSection from "@/app/(console)/virtual-keys/components/CreateKeyModal/CreateKeyForm/OptionalSettingsSection";
-import { ModelAliases } from "@/app/(console)/virtual-keys/components/CreateKeyModal/types";
-import { getPredefinedTags, prepareFormValues } from "@/app/(console)/virtual-keys/components/CreateKeyModal/utils";
-import { fetchTeams } from "@/app/(console)/virtual-keys/networking";
-import useTeams from "@/app/(console)/virtual-keys/hooks/useTeams";
-import useAuthorized from "@/app/(console)/hooks/useAuthorized";
+} from "@/app/dashboard/virtual-keys/components/CreateKeyModal/hooks";
+import OwnershipSection from "@/app/dashboard/virtual-keys/components/CreateKeyModal/CreateKeyForm/OwnershipSection";
+import KeyDetailsSection from "@/app/dashboard/virtual-keys/components/CreateKeyModal/CreateKeyForm/KeyDetailsSection";
+import OptionalSettingsSection from "@/app/dashboard/virtual-keys/components/CreateKeyModal/CreateKeyForm/OptionalSettingsSection";
+import { ModelAliases } from "@/app/dashboard/virtual-keys/components/CreateKeyModal/types";
+import { getPredefinedTags, prepareFormValues } from "@/app/dashboard/virtual-keys/components/CreateKeyModal/utils";
+import { fetchTeams } from "@/app/dashboard/virtual-keys/networking";
+import useTeams from "@/app/dashboard/virtual-keys/hooks/useTeams";
+import useAuthorized from "@/app/dashboard/hooks/useAuthorized";
export interface CreateKeyModalProps {
isModalVisible: boolean;
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/index.ts b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/index.ts
similarity index 100%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/index.ts
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/index.ts
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/useGuardrailsAndPrompts.ts b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/useGuardrailsAndPrompts.ts
similarity index 83%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/useGuardrailsAndPrompts.ts
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/useGuardrailsAndPrompts.ts
index d092219f70b..2445240e1ee 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/useGuardrailsAndPrompts.ts
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/useGuardrailsAndPrompts.ts
@@ -1,6 +1,6 @@
import { useEffect, useState } from "react";
-import { fetchGuardrails, fetchPrompts } from "@/app/(console)/virtual-keys/components/CreateKeyModal/networking";
-import useAuthorized from "@/app/(console)/hooks/useAuthorized";
+import { fetchGuardrails, fetchPrompts } from "@/app/dashboard/virtual-keys/components/CreateKeyModal/networking";
+import useAuthorized from "@/app/dashboard/hooks/useAuthorized";
export const useGuardrailsAndPrompts = () => {
const [guardrails, setGuardrails] = useState<string[]>([]);
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/useMcpAccessGroups.ts b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/useMcpAccessGroups.ts
similarity index 80%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/useMcpAccessGroups.ts
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/useMcpAccessGroups.ts
index 8313f6e8d6d..50070400004 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/useMcpAccessGroups.ts
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/useMcpAccessGroups.ts
@@ -1,6 +1,6 @@
import { useEffect, useState } from "react";
-import { getMCPAccessGroups } from "@/app/(console)/virtual-keys/components/CreateKeyModal/networking";
-import useAuthorized from "@/app/(console)/hooks/useAuthorized";
+import { getMCPAccessGroups } from "@/app/dashboard/virtual-keys/components/CreateKeyModal/networking";
+import useAuthorized from "@/app/dashboard/hooks/useAuthorized";
export const useMcpAccessGroups = () => {
const [mcpAccessGroups, setMcpAccessGroups] = useState<string[]>([]);
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/useTeamModels.ts b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/useTeamModels.ts
similarity index 89%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/useTeamModels.ts
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/useTeamModels.ts
index c28ef0ecdb2..979337f5aad 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/useTeamModels.ts
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/useTeamModels.ts
@@ -1,7 +1,7 @@
import { useEffect, useMemo, useState } from "react";
import type { Team } from "@/components/key_team_helpers/key_list";
-import { fetchTeamModels } from "@/app/(console)/virtual-keys/components/CreateKeyModal/networking";
-import useAuthorized from "@/app/(console)/hooks/useAuthorized";
+import { fetchTeamModels } from "@/app/dashboard/virtual-keys/components/CreateKeyModal/networking";
+import useAuthorized from "@/app/dashboard/hooks/useAuthorized";
export const useTeamModels = (selectedTeam: Team | null) => {
const { userId: userID, userRole, accessToken } = useAuthorized();
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/useUserModels.ts b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/useUserModels.ts
similarity index 81%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/useUserModels.ts
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/useUserModels.ts
index ddba6879cc9..badcaf93d9b 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/useUserModels.ts
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/useUserModels.ts
@@ -1,6 +1,6 @@
import { useEffect, useState } from "react";
-import { getUserModelNames } from "@/app/(console)/virtual-keys/components/CreateKeyModal/networking";
-import useAuthorized from "@/app/(console)/hooks/useAuthorized";
+import { getUserModelNames } from "@/app/dashboard/virtual-keys/components/CreateKeyModal/networking";
+import useAuthorized from "@/app/dashboard/hooks/useAuthorized";
export const useUserModels = () => {
const { userId: userID, userRole, accessToken } = useAuthorized();
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/useUserSearch.ts b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/useUserSearch.ts
similarity index 89%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/useUserSearch.ts
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/useUserSearch.ts
index 782beccf48f..a3840bdc624 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/hooks/useUserSearch.ts
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/hooks/useUserSearch.ts
@@ -1,7 +1,7 @@
import { useEffect, useMemo, useState } from "react";
import { debounce } from "lodash";
-import { searchUserOptionsByEmail } from "@/app/(console)/virtual-keys/components/CreateKeyModal/networking";
-import useAuthorized from "@/app/(console)/hooks/useAuthorized";
+import { searchUserOptionsByEmail } from "@/app/dashboard/virtual-keys/components/CreateKeyModal/networking";
+import useAuthorized from "@/app/dashboard/hooks/useAuthorized";
type User = { user_id: string; user_email: string; role?: string };
export interface UserOption {
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/networking.ts b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/networking.ts
similarity index 95%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/networking.ts
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/networking.ts
index 6cb4e2f7f07..2277800dad7 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/networking.ts
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/networking.ts
@@ -6,7 +6,7 @@ import {
User,
userFilterUICall,
} from "@/components/networking";
-import { ModelAvailableResponse, UserOption } from "@/app/(console)/virtual-keys/components/CreateKeyModal/types";
+import { ModelAvailableResponse, UserOption } from "@/app/dashboard/virtual-keys/components/CreateKeyModal/types";
export const fetchGuardrails = async (accessToken: string) => {
try {
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/types.ts b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/types.ts
similarity index 100%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/types.ts
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/types.ts
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/utils.ts b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/utils.ts
similarity index 98%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/utils.ts
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/utils.ts
index 066770cf468..73cd433e78e 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/CreateKeyModal/utils.ts
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/CreateKeyModal/utils.ts
@@ -1,5 +1,5 @@
import { mapDisplayToInternalNames } from "@/components/callback_info_helpers";
-import { ModelAliases } from "@/app/(console)/virtual-keys/components/CreateKeyModal/types";
+import { ModelAliases } from "@/app/dashboard/virtual-keys/components/CreateKeyModal/types";
export const getPredefinedTags = (data: any[] | null) => {
let allTags = [];
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/KeyInfoView.tsx b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/KeyInfoView.tsx
similarity index 99%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/KeyInfoView.tsx
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/KeyInfoView.tsx
index 1c7185f1dc4..9f9a47fbe10 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/KeyInfoView.tsx
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/KeyInfoView.tsx
@@ -1,3 +1,5 @@
+"use client";
+
import React, { useEffect, useState } from "react";
import {
Card,
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/SaveKeyModal.tsx b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/SaveKeyModal.tsx
similarity index 99%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/SaveKeyModal.tsx
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/SaveKeyModal.tsx
index bd0d425c465..fed678aadca 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/SaveKeyModal.tsx
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/SaveKeyModal.tsx
@@ -1,3 +1,5 @@
+"use client";
+
import { Button, Col, Grid, Text, Title } from "@tremor/react";
import { CopyToClipboard } from "react-copy-to-clipboard";
import { Modal } from "antd";
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/VirtualKeysTable/VirtualKeysTable.tsx b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/VirtualKeysTable/VirtualKeysTable.tsx
similarity index 99%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/VirtualKeysTable/VirtualKeysTable.tsx
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/VirtualKeysTable/VirtualKeysTable.tsx
index cdbd7cee434..b7727a299bf 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/VirtualKeysTable/VirtualKeysTable.tsx
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/VirtualKeysTable/VirtualKeysTable.tsx
@@ -1,5 +1,5 @@
-// TODO: refactor
"use client";
+// TODO: refactor
import React, { useEffect, useState } from "react";
import { ColumnDef } from "@tanstack/react-table";
@@ -16,9 +16,9 @@ import { Organization, userListCall } from "@/components/networking";
import { getModelDisplayName } from "@/components/key_team_helpers/fetch_available_models_team_key";
import FilterComponent, { FilterOption } from "@/components/molecules/filter";
import { useFilterLogic } from "@/components/key_team_helpers/filter_logic";
-import useTeams from "@/app/(console)/virtual-keys/hooks/useTeams";
-import useAuthorized from "@/app/(console)/hooks/useAuthorized";
-import KeyInfoView from "@/app/(console)/virtual-keys/components/KeyInfoView";
+import useTeams from "@/app/dashboard/virtual-keys/hooks/useTeams";
+import useAuthorized from "@/app/dashboard/hooks/useAuthorized";
+import KeyInfoView from "@/app/dashboard/virtual-keys/components/KeyInfoView";
interface AllKeysTableProps {
keys: KeyResponse[];
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/components/VirtualKeysTable/hooks/useFilterLogic.ts b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/VirtualKeysTable/hooks/useFilterLogic.ts
similarity index 100%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/components/VirtualKeysTable/hooks/useFilterLogic.ts
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/components/VirtualKeysTable/hooks/useFilterLogic.ts
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/hooks/useTeams.tsx b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/hooks/useTeams.tsx
similarity index 79%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/hooks/useTeams.tsx
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/hooks/useTeams.tsx
index d1208737ec2..92e5896e764 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/hooks/useTeams.tsx
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/hooks/useTeams.tsx
@@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
-import { fetchTeams } from "@/app/(console)/virtual-keys/networking";
+import { fetchTeams } from "@/app/dashboard/virtual-keys/networking";
import { Team } from "@/components/key_team_helpers/key_list";
-import useAuthorized from "@/app/(console)/hooks/useAuthorized";
+import useAuthorized from "@/app/dashboard/hooks/useAuthorized";
const useTeams = () => {
const [teams, setTeams] = useState<Team[]>([]);
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/networking.ts b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/networking.ts
similarity index 100%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/networking.ts
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/networking.ts
diff --git a/ui/litellm-dashboard/src/app/(console)/virtual-keys/page.tsx b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/page.tsx
similarity index 81%
rename from ui/litellm-dashboard/src/app/(console)/virtual-keys/page.tsx
rename to ui/litellm-dashboard/src/app/dashboard/virtual-keys/page.tsx
index 9554905088b..7dfc959867c 100644
--- a/ui/litellm-dashboard/src/app/(console)/virtual-keys/page.tsx
+++ b/ui/litellm-dashboard/src/app/dashboard/virtual-keys/page.tsx
@@ -1,15 +1,12 @@
"use client";
-import VirtualKeysTable from "@/app/(console)/virtual-keys/components/VirtualKeysTable/VirtualKeysTable";
-import { getCookie } from "@/utils/cookieUtils";
-import { jwtDecode } from "jwt-decode";
+import VirtualKeysTable from "@/app/dashboard/virtual-keys/components/VirtualKeysTable/VirtualKeysTable";
import { useState } from "react";
import useKeyList from "@/components/key_team_helpers/key_list";
-import { useRouter } from "next/navigation";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { Col, Grid } from "@tremor/react";
-import CreateKey from "@/app/(console)/virtual-keys/components/CreateKey";
-import useAuthorized from "@/app/(console)/hooks/useAuthorized"
+import CreateKey from "@/app/dashboard/virtual-keys/components/CreateKey";
+import useAuthorized from "@/app/dashboard/hooks/useAuthorized"
const VirtualKeysPage = () => {
const {accessToken, userRole} = useAuthorized();
diff --git a/ui/litellm-dashboard/src/app/page.tsx b/ui/litellm-dashboard/src/app/page.tsx
index eff997a3aaf..3815df002bd 100644
--- a/ui/litellm-dashboard/src/app/page.tsx
+++ b/ui/litellm-dashboard/src/app/page.tsx
@@ -40,8 +40,8 @@ import UIThemeSettings from "@/components/ui_theme_settings";
import { UiLoadingSpinner } from "@/components/ui/ui-loading-spinner";
import { cx } from "@/lib/cva.config";
import useFeatureFlags, { FeatureFlagsProvider } from "@/hooks/useFeatureFlags";
-import Sidebar2 from "@/app/(console)/components/Sidebar2";
-import SidebarProvider from "@/app/(console)/components/SidebarProvider";
+import Sidebar2 from "@/app/dashboard/components/Sidebar2";
+import SidebarProvider from "@/app/dashboard/components/SidebarProvider";
function getCookie(name: string) {
const cookieValue = document.cookie.split("; ").find((row) => row.startsWith(name + "="));
diff --git a/ui/litellm-dashboard/src/components/organisms/create_key_button.tsx b/ui/litellm-dashboard/src/components/organisms/create_key_button.tsx
index 20c1f5b3a36..d4035e83f09 100644
--- a/ui/litellm-dashboard/src/components/organisms/create_key_button.tsx
+++ b/ui/litellm-dashboard/src/components/organisms/create_key_button.tsx
@@ -135,7 +135,7 @@ export const fetchUserModels = async (
/**
* ─────────────────────────────────────────────────────────────────────────
* @deprecated
- * This component is being DEPRECATED in favor of src/app/(console)/virtual-keys/components/CreateKey.tsx
+ * This component is being DEPRECATED in favor of src/app/dashboard/virtual-keys/components/CreateKey.tsx
* Please contribute to the new refactor.
* ─────────────────────────────────────────────────────────────────────────
*/
diff --git a/ui/litellm-dashboard/src/components/templates/key_info_view.tsx b/ui/litellm-dashboard/src/components/templates/key_info_view.tsx
index 0080924fb61..ba04e2644a8 100644
--- a/ui/litellm-dashboard/src/components/templates/key_info_view.tsx
+++ b/ui/litellm-dashboard/src/components/templates/key_info_view.tsx
@@ -50,7 +50,7 @@ interface KeyInfoViewProps {
/**
* ─────────────────────────────────────────────────────────────────────────
* @deprecated
- * This component is being DEPRECATED in favor of src/app/(console)/virtual-keys/components/KeyInfoView.tsx
+ * This component is being DEPRECATED in favor of src/app/dashboard/virtual-keys/components/KeyInfoView.tsx
* Please contribute to the new refactor.
* ─────────────────────────────────────────────────────────────────────────
*/
diff --git a/ui/litellm-dashboard/src/components/templates/view_key_table.tsx b/ui/litellm-dashboard/src/components/templates/view_key_table.tsx
index f3ba12d56d5..3fad7c0a35e 100644
--- a/ui/litellm-dashboard/src/components/templates/view_key_table.tsx
+++ b/ui/litellm-dashboard/src/components/templates/view_key_table.tsx
@@ -138,7 +138,7 @@ interface CombinedLimits {
/**
* ─────────────────────────────────────────────────────────────────────────
* @deprecated
- * This component is being DEPRECATED in favor of src/app/(console)/virtual-keys/components/VirtualKeysTable/
+ * This component is being DEPRECATED in favor of src/app/dashboard/virtual-keys/components/VirtualKeysTable/
* Please contribute to the new refactor.
* ─────────────────────────────────────────────────────────────────────────
*/