Skip to content

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

chore: limit event id length (#5934)

Max Deichmann80c298fa1e1f
diff --git a/packages/shared/src/server/ingestion/types.ts b/packages/shared/src/server/ingestion/types.ts
index 2eeefcdc11..a3ccd3a41f 100644
--- a/packages/shared/src/server/ingestion/types.ts
+++ b/packages/shared/src/server/ingestion/types.ts
@@ -8,6 +8,7 @@ import { type ScoreSourceType } from "../repositories";
export const idSchema = z
.string()
.min(1)
+ .max(800) // AWS S3 allows for 1024 bytes for object keys and we need enough room to construct the entire key/path. https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
.refine((id) => !id.includes("\r"), {
message: "ID cannot contain carriage return characters",
});