diff --git a/app/src/pages/trace/SpanDetails.tsx b/app/src/pages/trace/SpanDetails.tsx index 4e55554103..a6a90f2470 100644 --- a/app/src/pages/trace/SpanDetails.tsx +++ b/app/src/pages/trace/SpanDetails.tsx @@ -1331,11 +1331,13 @@ function LLMMessage({ message }: { message: AttributeMessage }) { `} > {toolCall?.function?.name as string}( - {JSON.stringify( - JSON.parse(toolCall?.function?.arguments as string), - null, - 2 - )} + {typeof toolCall?.function?.arguments === "string" + ? JSON.stringify( + JSON.parse(toolCall?.function?.arguments as string), + null, + 2 + ) + : ""} ) );