Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(ui): no pretty obervation rendering if other properties exist

Marc Klingen9cb9e64aba71
diff --git a/src/components/trace/IOPreview.tsx b/src/components/trace/IOPreview.tsx
index 1b25581aff..4157caca53 100644
--- a/src/components/trace/IOPreview.tsx
+++ b/src/components/trace/IOPreview.tsx
@@ -107,6 +107,7 @@ const OpenAiMessageSchema = z
role: z.enum(["system", "user", "assistant"]).optional(),
content: z.string().nullable(),
})
+ .strict() // no additional properties
.refine((value) => value.content !== null || value.role !== undefined);
const OpenAiMessageArraySchema = z.array(OpenAiMessageSchema).min(1);