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]

feat(ui): migrate policies, guardrails, prompts, tool-policies, and skills to path routes (#30263)

ryan-crabbe-berri2893f9b67b74
diff --git a/ui/litellm-dashboard/e2e_tests/fixtures/migratedPages.ts b/ui/litellm-dashboard/e2e_tests/fixtures/migratedPages.ts
index a56ce79d8f1..17a27d451df 100644
--- a/ui/litellm-dashboard/e2e_tests/fixtures/migratedPages.ts
+++ b/ui/litellm-dashboard/e2e_tests/fixtures/migratedPages.ts
@@ -10,8 +10,7 @@
*
* Keep this in lockstep with MIGRATED_PAGES in src/utils/migratedPages.ts.
* Pending (add as each PR lands): the leaf-pages batch
- * (caching, cost-tracking, guardrails, logs, policies, prompts, skills,
- * tool-policies, transform-request, ui-theme).
+ * (caching, cost-tracking, logs, transform-request, ui-theme).
*/
export const MIGRATED_E2E_PAGES: Record<string, string> = {
api_ref: "api-reference",
@@ -26,6 +25,11 @@ export const MIGRATED_E2E_PAGES: Record<string, string> = {
"tag-management": "tag-management",
"vector-stores": "vector-stores",
memory: "memory",
+ policies: "policies",
+ guardrails: "guardrails",
+ prompts: "prompts",
+ "tool-policies": "tool-policies",
+ skills: "skills",
};
export const MIGRATED_E2E_SEGMENTS: string[] = [...new Set(Object.values(MIGRATED_E2E_PAGES))];
diff --git a/ui/litellm-dashboard/eslint-suppressions.json b/ui/litellm-dashboard/eslint-suppressions.json
index b838736ba26..53dde4d28a4 100644
--- a/ui/litellm-dashboard/eslint-suppressions.json
+++ b/ui/litellm-dashboard/eslint-suppressions.json
@@ -1774,30 +1774,22 @@
"count": 2
}
},
- "src/components/prompts.tsx": {
- "no-restricted-imports": {
- "count": 1
- },
- "react-hooks/set-state-in-effect": {
- "count": 1
- }
- },
- "src/components/prompts/add_prompt_form.tsx": {
+ "src/app/(dashboard)/prompts/components/add_prompt_form.tsx": {
"no-restricted-imports": {
"count": 1
}
},
- "src/components/prompts/prompt_editor_view/DeveloperMessageCard.tsx": {
+ "src/app/(dashboard)/prompts/components/prompt_editor_view/DeveloperMessageCard.tsx": {
"no-restricted-imports": {
"count": 1
}
},
- "src/components/prompts/prompt_editor_view/ModelConfigCard.tsx": {
+ "src/app/(dashboard)/prompts/components/prompt_editor_view/ModelConfigCard.tsx": {
"no-restricted-imports": {
"count": 1
}
},
- "src/components/prompts/prompt_editor_view/PromptCodeSnippets.tsx": {
+ "src/app/(dashboard)/prompts/components/prompt_editor_view/PromptCodeSnippets.tsx": {
"no-restricted-imports": {
"count": 1
},
@@ -1805,52 +1797,52 @@
"count": 1
}
},
- "src/components/prompts/prompt_editor_view/PromptEditorHeader.tsx": {
+ "src/app/(dashboard)/prompts/components/prompt_editor_view/PromptEditorHeader.tsx": {
"no-restricted-imports": {
"count": 1
}
},
- "src/components/prompts/prompt_editor_view/PromptMessagesCard.tsx": {
+ "src/app/(dashboard)/prompts/components/prompt_editor_view/PromptMessagesCard.tsx": {
"no-restricted-imports": {
"count": 1
}
},
- "src/components/prompts/prompt_editor_view/PublishModal.tsx": {
+ "src/app/(dashboard)/prompts/components/prompt_editor_view/PublishModal.tsx": {
"no-restricted-imports": {
"count": 1
}
},
- "src/components/prompts/prompt_editor_view/ToolsCard.tsx": {
+ "src/app/(dashboard)/prompts/components/prompt_editor_view/ToolsCard.tsx": {
"no-restricted-imports": {
"count": 1
}
},
- "src/components/prompts/prompt_editor_view/VersionHistorySidePanel.test.tsx": {
+ "src/app/(dashboard)/prompts/components/prompt_editor_view/VersionHistorySidePanel.test.tsx": {
"max-nested-callbacks": {
"count": 1
}
},
- "src/components/prompts/prompt_editor_view/VersionHistorySidePanel.tsx": {
+ "src/app/(dashboard)/prompts/components/prompt_editor_view/VersionHistorySidePanel.tsx": {
"react-hooks/immutability": {
"count": 1
}
},
- "src/components/prompts/prompt_editor_view/conversation_panel/MessageInput.tsx": {
+ "src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/MessageInput.tsx": {
"no-restricted-imports": {
"count": 1
}
},
- "src/components/prompts/prompt_editor_view/conversation_panel/index.tsx": {
+ "src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/index.tsx": {
"no-restricted-imports": {
"count": 1
}
},
- "src/components/prompts/prompt_editor_view/conversation_panel/useConversation.ts": {
+ "src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/useConversation.ts": {
"no-restricted-syntax": {
"count": 1
}
},
- "src/components/prompts/prompt_info.tsx": {
+ "src/app/(dashboard)/prompts/components/prompt_info.tsx": {
"no-restricted-imports": {
"count": 1
},
@@ -1858,7 +1850,7 @@
"count": 2
}
},
- "src/components/prompts/prompt_table.tsx": {
+ "src/app/(dashboard)/prompts/components/prompt_table.tsx": {
"no-restricted-imports": {
"count": 1
}
@@ -2249,5 +2241,13 @@
"react/display-name": {
"count": 1
}
+ },
+ "src/app/(dashboard)/prompts/components/index.tsx": {
+ "no-restricted-imports": {
+ "count": 1
+ },
+ "react-hooks/set-state-in-effect": {
+ "count": 1
+ }
}
}
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/guardrails/page.tsx b/ui/litellm-dashboard/src/app/(dashboard)/guardrails/page.tsx
new file mode 100644
index 00000000000..4e7fa88f70f
--- /dev/null
+++ b/ui/litellm-dashboard/src/app/(dashboard)/guardrails/page.tsx
@@ -0,0 +1,9 @@
+"use client";
+
+import GuardrailsPanel from "@/components/guardrails";
+import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
+
+export default function Guardrails() {
+ const { accessToken, userRole } = useAuthorized();
+ return <GuardrailsPanel accessToken={accessToken} userRole={userRole} />;
+}
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/page.tsx b/ui/litellm-dashboard/src/app/(dashboard)/page.tsx
index 9758786331f..9318bc1b332 100644
--- a/ui/litellm-dashboard/src/app/(dashboard)/page.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/page.tsx
@@ -4,15 +4,12 @@ import ModelsAndEndpointsView from "@/app/(dashboard)/models-and-endpoints/Model
import AdminPanel from "@/components/AdminPanel";
import AgentsPanel from "@/components/agents";
import CacheDashboard from "@/components/cache_dashboard";
-import ClaudeCodePluginsPanel from "@/components/claude_code_plugins";
import { teamListCall as v2TeamListCall } from "@/app/(dashboard)/hooks/teams/useTeams";
import { useUISettings } from "@/app/(dashboard)/hooks/uiSettings/useUISettings";
import useProxySettings from "@/app/(dashboard)/hooks/proxySettings/useProxySettings";
import LoadingScreen from "@/components/common_components/LoadingScreen";
import { CostTrackingSettings } from "@/components/CostTrackingSettings";
import GeneralSettings from "@/components/general_settings";
-import GuardrailsPanel from "@/components/guardrails";
-import PoliciesPanel from "@/components/policies";
import { Team } from "@/components/key_team_helpers/key_list";
import ModelHubTable from "@/components/AIHub/ModelHubTable";
import { Organization, proxyBaseUrl, getInProductNudgesCall } from "@/components/networking";
@@ -21,7 +18,6 @@ import OldTeams from "@/components/OldTeams";
import { fetchUserModels, CreateKeyPrefillData } from "@/components/organisms/create_key_button";
import Organizations, { fetchOrganizations } from "@/components/organizations";
import PassThroughSettings from "@/components/pass_through_settings";
-import PromptsPanel from "@/components/prompts";
import PublicModelHub from "@/components/public_model_hub";
import Settings from "@/components/settings";
import { SurveyPrompt, SurveyModal, ClaudeCodePrompt, ClaudeCodeModal } from "@/components/survey";
@@ -29,7 +25,6 @@ import TransformRequestPanel from "@/components/transform_request";
import UIThemeSettings from "@/components/ui_theme_settings";
import Usage from "@/components/usage";
import UserDashboard from "@/components/user_dashboard";
-import ToolPoliciesView from "@/components/ToolPoliciesView";
import SpendLogsTable from "@/components/view_logs";
import ViewUserDashboard from "@/components/view_users";
import { useAuth } from "@/contexts/AuthContext";
@@ -377,14 +372,8 @@ function CreateKeyPageContent() {
<AdminPanel proxySettings={proxySettings} />
) : page == "logging-and-alerts" ? (
<Settings userID={userID} userRole={userRole} accessToken={accessToken} premiumUser={premiumUser} />
- ) : page == "guardrails" ? (
- <GuardrailsPanel accessToken={accessToken} userRole={userRole} />
- ) : page == "policies" ? (
- <PoliciesPanel accessToken={accessToken} userRole={userRole} />
) : page == "agents" ? (
<AgentsPanel accessToken={accessToken} userRole={userRole} teams={teams} />
- ) : page == "prompts" ? (
- <PromptsPanel accessToken={accessToken} userRole={userRole} />
) : page == "transform-request" ? (
<TransformRequestPanel accessToken={accessToken} />
) : page == "router-settings" ? (
@@ -428,10 +417,6 @@ function CreateKeyPageContent() {
accessToken={accessToken}
premiumUser={premiumUser}
/>
- ) : page == "skills" || page == "claude-code-plugins" ? (
- <ClaudeCodePluginsPanel accessToken={accessToken} userRole={userRole} />
- ) : page == "tool-policies" ? (
- <ToolPoliciesView accessToken={accessToken} userRole={userRole} />
) : page == "new_usage" ? (
<NewUsagePage teams={(teams as Team[]) ?? []} organizations={(organizations as Organization[]) ?? []} />
) : (
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/policies/page.tsx b/ui/litellm-dashboard/src/app/(dashboard)/policies/page.tsx
new file mode 100644
index 00000000000..eb7840d8795
--- /dev/null
+++ b/ui/litellm-dashboard/src/app/(dashboard)/policies/page.tsx
@@ -0,0 +1,9 @@
+"use client";
+
+import PoliciesPanel from "@/components/policies";
+import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
+
+export default function Policies() {
+ const { accessToken, userRole } = useAuthorized();
+ return <PoliciesPanel accessToken={accessToken} userRole={userRole} />;
+}
diff --git a/ui/litellm-dashboard/src/components/prompts/README.md b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/README.md
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/README.md
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/README.md
diff --git a/ui/litellm-dashboard/src/components/prompts/add_prompt_form.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/add_prompt_form.tsx
similarity index 96%
rename from ui/litellm-dashboard/src/components/prompts/add_prompt_form.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/add_prompt_form.tsx
index cdb77bb66fc..48623bbda60 100644
--- a/ui/litellm-dashboard/src/components/prompts/add_prompt_form.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/add_prompt_form.tsx
@@ -3,8 +3,8 @@ import { Modal, Form, Select, Upload, Button, Divider } from "antd";
import { TextInput } from "@tremor/react";
import { UploadOutlined } from "@ant-design/icons";
import type { UploadFile, UploadProps } from "antd";
-import { convertPromptFileToJson, createPromptCall } from "../networking";
-import NotificationsManager from "../molecules/notifications_manager";
+import { convertPromptFileToJson, createPromptCall } from "@/components/networking";
+import NotificationsManager from "@/components/molecules/notifications_manager";
const { Option } = Select;
diff --git a/ui/litellm-dashboard/src/components/prompts.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/index.tsx
similarity index 94%
rename from ui/litellm-dashboard/src/components/prompts.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/index.tsx
index 1e0155a7738..3430d9808d1 100644
--- a/ui/litellm-dashboard/src/components/prompts.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/index.tsx
@@ -2,12 +2,12 @@ import React, { useState, useEffect } from "react";
import { Button } from "@tremor/react";
import { Modal, Select } from "antd";
-import { getPromptsList, PromptSpec, ListPromptsResponse, deletePromptCall } from "./networking";
-import PromptTable from "./prompts/prompt_table";
-import PromptInfoView from "./prompts/prompt_info";
-import AddPromptForm from "./prompts/add_prompt_form";
-import PromptEditorView from "./prompts/prompt_editor_view";
-import NotificationsManager from "./molecules/notifications_manager";
+import { getPromptsList, PromptSpec, ListPromptsResponse, deletePromptCall } from "@/components/networking";
+import PromptTable from "./prompt_table";
+import PromptInfoView from "./prompt_info";
+import AddPromptForm from "./add_prompt_form";
+import PromptEditorView from "./prompt_editor_view";
+import NotificationsManager from "@/components/molecules/notifications_manager";
import { isAdminRole, isProxyAdminRole } from "@/utils/roles";
interface PromptsProps {
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/DeveloperMessageCard.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/DeveloperMessageCard.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/DeveloperMessageCard.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/DeveloperMessageCard.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/DotpromptViewTab.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/DotpromptViewTab.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/DotpromptViewTab.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/DotpromptViewTab.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/ModelConfigCard.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/ModelConfigCard.tsx
similarity index 97%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/ModelConfigCard.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/ModelConfigCard.tsx
index aa564160ddf..66ddb90bea3 100644
--- a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/ModelConfigCard.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/ModelConfigCard.tsx
@@ -2,7 +2,7 @@ import React, { useState } from "react";
import { Text } from "@tremor/react";
import { Input } from "antd";
import { SettingsIcon } from "lucide-react";
-import ModelSelector from "../../common_components/ModelSelector";
+import ModelSelector from "@/components/common_components/ModelSelector";
interface ModelConfigCardProps {
model: string;
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/PromptCodeSnippets.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/PromptCodeSnippets.tsx
similarity index 99%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/PromptCodeSnippets.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/PromptCodeSnippets.tsx
index 89b74b88bc4..3d52b3c03e5 100644
--- a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/PromptCodeSnippets.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/PromptCodeSnippets.tsx
@@ -4,7 +4,7 @@ import { CodeOutlined } from "@ant-design/icons";
import { Button as TremorButton, Text } from "@tremor/react";
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
import { coy } from "react-syntax-highlighter/dist/esm/styles/prism";
-import NotificationsManager from "../../molecules/notifications_manager";
+import NotificationsManager from "@/components/molecules/notifications_manager";
interface PromptCodeSnippetsProps {
promptId: string;
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/PromptEditorHeader.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/PromptEditorHeader.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/PromptEditorHeader.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/PromptEditorHeader.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/PromptMessagesCard.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/PromptMessagesCard.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/PromptMessagesCard.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/PromptMessagesCard.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/PublishModal.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/PublishModal.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/PublishModal.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/PublishModal.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/ToolsCard.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/ToolsCard.test.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/ToolsCard.test.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/ToolsCard.test.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/ToolsCard.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/ToolsCard.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/ToolsCard.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/ToolsCard.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/VersionHistorySidePanel.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/VersionHistorySidePanel.test.tsx
similarity index 98%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/VersionHistorySidePanel.test.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/VersionHistorySidePanel.test.tsx
index b0346e03a2d..c76c64b89a6 100644
--- a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/VersionHistorySidePanel.test.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/VersionHistorySidePanel.test.tsx
@@ -1,11 +1,11 @@
import { describe, it, expect, vi, beforeEach, afterEach, type Mock } from "vitest";
import { render, screen, fireEvent, act, waitFor } from "@testing-library/react";
import VersionHistorySidePanel from "./VersionHistorySidePanel";
-import { getPromptVersions } from "../../networking";
-import type { PromptSpec } from "../../networking";
+import { getPromptVersions } from "@/components/networking";
+import type { PromptSpec } from "@/components/networking";
// Mock the networking function
-vi.mock("../../networking", () => ({
+vi.mock("@/components/networking", () => ({
getPromptVersions: vi.fn(),
}));
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/VersionHistorySidePanel.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/VersionHistorySidePanel.tsx
similarity index 98%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/VersionHistorySidePanel.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/VersionHistorySidePanel.tsx
index 851bdb78ad2..97fe70ba3e1 100644
--- a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/VersionHistorySidePanel.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/VersionHistorySidePanel.tsx
@@ -1,6 +1,6 @@
import { Drawer, List, Skeleton, Tag, Typography } from "antd";
import React, { useEffect, useState } from "react";
-import { getPromptVersions, PromptSpec } from "../../networking";
+import { getPromptVersions, PromptSpec } from "@/components/networking";
const { Text } = Typography;
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/EmptyState.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/EmptyState.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/EmptyState.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/EmptyState.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/MessageBubble.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/MessageBubble.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/MessageBubble.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/MessageBubble.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/MessageInput.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/MessageInput.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/MessageInput.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/MessageInput.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/MessageList.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/MessageList.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/MessageList.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/MessageList.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/VariableInput.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/VariableInput.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/VariableInput.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/VariableInput.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/VariableWarning.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/VariableWarning.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/VariableWarning.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/VariableWarning.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/index.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/index.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/index.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/index.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/types.ts b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/types.ts
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/types.ts
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/types.ts
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/useConversation.ts b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/useConversation.ts
similarity index 97%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/useConversation.ts
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/useConversation.ts
index e55d8bdeadf..d8632170c69 100644
--- a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/conversation_panel/useConversation.ts
+++ b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/conversation_panel/useConversation.ts
@@ -1,9 +1,9 @@
import { useState, useRef, useEffect } from "react";
-import NotificationsManager from "../../../molecules/notifications_manager";
+import NotificationsManager from "@/components/molecules/notifications_manager";
import { TokenUsage } from "@/components/chat_ui/ResponseMetrics";
import { Message } from "./types";
import { convertToDotPrompt, extractVariables } from "../utils";
-import { getProxyBaseUrl, getGlobalLitellmHeaderName } from "../../../networking";
+import { getProxyBaseUrl, getGlobalLitellmHeaderName } from "@/components/networking";
export const useConversation = (prompt: any, accessToken: string | null) => {
const [isLoading, setIsLoading] = useState(false);
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/index.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/index.tsx
similarity index 99%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/index.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/index.tsx
index c8c572468f8..046805c15b8 100644
--- a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/index.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/index.tsx
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import ToolModal from "../tool_modal";
-import NotificationsManager from "../../molecules/notifications_manager";
-import { createPromptCall, updatePromptCall, getPromptInfo } from "../../networking";
+import NotificationsManager from "@/components/molecules/notifications_manager";
+import { createPromptCall, updatePromptCall, getPromptInfo } from "@/components/networking";
import { PromptType, PromptEditorViewProps, Tool } from "./types";
import { convertToDotPrompt, parseExistingPrompt } from "./utils";
import PromptEditorHeader from "./PromptEditorHeader";
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/types.ts b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/types.ts
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/types.ts
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/types.ts
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/utils.test.ts b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/utils.test.ts
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/utils.test.ts
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/utils.test.ts
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/utils.ts b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/utils.ts
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_editor_view/utils.ts
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_editor_view/utils.ts
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_info.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_info.tsx
similarity index 99%
rename from ui/litellm-dashboard/src/components/prompts/prompt_info.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_info.tsx
index a5e76542ebd..f96445c1a20 100644
--- a/ui/litellm-dashboard/src/components/prompts/prompt_info.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_info.tsx
@@ -29,7 +29,7 @@ import {
} from "@/components/networking";
import { copyToClipboard as utilCopyToClipboard } from "@/utils/dataUtils";
import { CheckIcon, CopyIcon } from "lucide-react";
-import NotificationsManager from "../molecules/notifications_manager";
+import NotificationsManager from "@/components/molecules/notifications_manager";
import PromptCodeSnippets from "./prompt_editor_view/PromptCodeSnippets";
import { extractModel, extractTemplateVariables, getBasePromptId, getCurrentVersion } from "./prompt_utils";
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_table.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_table.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_table.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_table.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_utils.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_utils.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/prompt_utils.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/prompt_utils.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/tool_modal.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/tool_modal.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/tool_modal.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/tool_modal.tsx
diff --git a/ui/litellm-dashboard/src/components/prompts/variable_textarea.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/components/variable_textarea.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/components/prompts/variable_textarea.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/prompts/components/variable_textarea.tsx
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/prompts/page.tsx b/ui/litellm-dashboard/src/app/(dashboard)/prompts/page.tsx
new file mode 100644
index 00000000000..59c194b0855
--- /dev/null
+++ b/ui/litellm-dashboard/src/app/(dashboard)/prompts/page.tsx
@@ -0,0 +1,9 @@
+"use client";
+
+import PromptsPanel from "./components";
+import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
+
+export default function Prompts() {
+ const { accessToken, userRole } = useAuthorized();
+ return <PromptsPanel accessToken={accessToken} userRole={userRole} />;
+}
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/skills/page.tsx b/ui/litellm-dashboard/src/app/(dashboard)/skills/page.tsx
new file mode 100644
index 00000000000..bd2b12c73b0
--- /dev/null
+++ b/ui/litellm-dashboard/src/app/(dashboard)/skills/page.tsx
@@ -0,0 +1,9 @@
+"use client";
+
+import ClaudeCodePluginsPanel from "@/components/claude_code_plugins";
+import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
+
+export default function Skills() {
+ const { accessToken, userRole } = useAuthorized();
+ return <ClaudeCodePluginsPanel accessToken={accessToken} userRole={userRole} />;
+}
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/tool-policies/page.tsx b/ui/litellm-dashboard/src/app/(dashboard)/tool-policies/page.tsx
new file mode 100644
index 00000000000..6aaebaab959
--- /dev/null
+++ b/ui/litellm-dashboard/src/app/(dashboard)/tool-policies/page.tsx
@@ -0,0 +1,9 @@
+"use client";
+
+import ToolPoliciesView from "@/components/ToolPoliciesView";
+import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
+
+export default function ToolPolicies() {
+ const { accessToken, userRole } = useAuthorized();
+ return <ToolPoliciesView accessToken={accessToken} userRole={userRole} />;
+}
diff --git a/ui/litellm-dashboard/src/utils/migratedPages.test.ts b/ui/litellm-dashboard/src/utils/migratedPages.test.ts
index 656b91a6c32..8471c8a2567 100644
--- a/ui/litellm-dashboard/src/utils/migratedPages.test.ts
+++ b/ui/litellm-dashboard/src/utils/migratedPages.test.ts
@@ -75,6 +75,19 @@ describe("migratedHref / legacyPageHref", () => {
expect(MIGRATED_PAGES["vector-stores"]).toBe("vector-stores");
expect(MIGRATED_PAGES.memory).toBe("memory");
});
+
+ it("maps the policies, guardrails, prompts, tool-policies, and skills ids to their routes", async () => {
+ vi.doMock("@/components/networking", () => ({ serverRootPath: "/" }));
+ const { MIGRATED_PAGES } = await import("./migratedPages");
+
+ expect(MIGRATED_PAGES.policies).toBe("policies");
+ expect(MIGRATED_PAGES.guardrails).toBe("guardrails");
+ expect(MIGRATED_PAGES.prompts).toBe("prompts");
+ expect(MIGRATED_PAGES["tool-policies"]).toBe("tool-policies");
+ expect(MIGRATED_PAGES.skills).toBe("skills");
+ // Old bookmarks used ?page=claude-code-plugins for the same panel.
+ expect(MIGRATED_PAGES["claude-code-plugins"]).toBe("skills");
+ });
});
describe("dev server (NODE_ENV=development)", () => {
@@ -128,6 +141,9 @@ describe("legacyKeyForPathname", () => {
// Resolves to the sidebar key api_ref, not the hyphenated alias, so highlighting works.
expect(legacyKeyForPathname("/ui/api-reference")).toBe("api_ref");
expect(legacyKeyForPathname("/ui/api-reference/")).toBe("api_ref");
+ // Same for skills: the claude-code-plugins alias maps to the same segment,
+ // and first-match-wins iteration must keep returning the sidebar key.
+ expect(legacyKeyForPathname("/ui/skills")).toBe("skills");
});
it("returns null for a not-yet-migrated path", async () => {
diff --git a/ui/litellm-dashboard/src/utils/migratedPages.ts b/ui/litellm-dashboard/src/utils/migratedPages.ts
index 8f8a21d97c6..f51a7af73c2 100644
--- a/ui/litellm-dashboard/src/utils/migratedPages.ts
+++ b/ui/litellm-dashboard/src/utils/migratedPages.ts
@@ -23,6 +23,13 @@ export const MIGRATED_PAGES: Record<string, string> = {
"tag-management": "tag-management",
"vector-stores": "vector-stores",
memory: "memory",
+ policies: "policies",
+ guardrails: "guardrails",
+ prompts: "prompts",
+ "tool-policies": "tool-policies",
+ skills: "skills",
+ // Legacy alias: the old switch matched ?page=claude-code-plugins for the same panel.
+ "claude-code-plugins": "skills",
};
function uiBase(): string {