diff --git a/ui/litellm-dashboard/src/components/view_logs/columns.tsx b/ui/litellm-dashboard/src/components/view_logs/columns.tsx index a9d9f65ac22..b01239278f8 100644 --- a/ui/litellm-dashboard/src/components/view_logs/columns.tsx +++ b/ui/litellm-dashboard/src/components/view_logs/columns.tsx @@ -221,3 +221,51 @@ const formatMessage = (message: any): string => { } return String(message); }; + +// Add this new component for displaying request/response with copy buttons +export const RequestResponsePanel = ({ request, response }: { request: any; response: any }) => { + const requestStr = typeof request === 'object' ? JSON.stringify(request, null, 2) : String(request || '{}'); + const responseStr = typeof response === 'object' ? JSON.stringify(response, null, 2) : String(response || '{}'); + + const copyToClipboard = (text: string) => { + navigator.clipboard.writeText(text); + }; + + return ( +
{requestStr}
+ {responseStr}
+
- {JSON.stringify(formatData(row.original.request_tags), null, 2)}
-
-
- {JSON.stringify(formatData(row.original.messages), null, 2)}
-
-
- {JSON.stringify(formatData(row.original.response), null, 2)}
-
- {JSON.stringify(row.original.metadata, null, 2)}
-
+ {/* Request/Response Panel */}
+
+ {JSON.stringify(row.original.metadata, null, 2)}
+
+