}) {
+ {/* Configuration Info Message - Show when data is missing */}
+
+
{/* Request/Response Panel */}
{/* Request Side */}
@@ -688,6 +711,7 @@ function RequestViewer({ row }: { row: Row }) {
onClick={() => navigator.clipboard.writeText(JSON.stringify(getRawRequest(), null, 2))}
className="p-1 hover:bg-gray-200 rounded"
title="Copy request"
+ disabled={!hasMessages}
>
@@ -715,6 +739,7 @@ function RequestViewer({ row }: { row: Row }) {
onClick={() => navigator.clipboard.writeText(JSON.stringify(formattedResponse(), null, 2))}
className="p-1 hover:bg-gray-200 rounded"
title="Copy response"
+ disabled={!hasResponse}
>
@@ -723,16 +748,18 @@ function RequestViewer({ row }: { row: Row }) {
-
{JSON.stringify(formattedResponse(), null, 2)}
+ {hasResponse ? (
+
{JSON.stringify(formattedResponse(), null, 2)}
+ ) : (
+
Response data not available
+ )}
-
{/* Error Card - Only show for failures */}
{hasError && errorInfo && }
-
{/* Tags Card - Only show if there are tags */}
{row.original.request_tags && Object.keys(row.original.request_tags).length > 0 && (
diff --git a/ui/litellm-dashboard/src/utils/roles.ts b/ui/litellm-dashboard/src/utils/roles.ts
new file mode 100644
index 0000000000..8ac2d7632b
--- /dev/null
+++ b/ui/litellm-dashboard/src/utils/roles.ts
@@ -0,0 +1,7 @@
+// Define admin roles and permissions
+export const old_admin_roles = ["Admin", "Admin Viewer"];
+export const v2_admin_role_names = ["proxy_admin", "proxy_admin_viewer", "org_admin"];
+export const all_admin_roles = [...old_admin_roles, ...v2_admin_role_names];
+
+export const internalUserRoles = ["Internal User", "Internal Viewer"];
+export const rolesAllowedToSeeUsage = ["Admin", "Admin Viewer", "Internal User", "Internal Viewer"];
\ No newline at end of file