fix(gateway): clamp chat.history to 1000 max

This commit is contained in:
Peter Steinberger
2025-12-16 19:55:17 +01:00
parent d691e28675
commit 74b19843ae
3 changed files with 13 additions and 12 deletions

View File

@@ -458,7 +458,7 @@ export const CronRunLogEntrySchema = Type.Object(
export const ChatHistoryParamsSchema = Type.Object(
{
sessionKey: NonEmptyString,
limit: Type.Optional(Type.Integer({ minimum: 1 })),
limit: Type.Optional(Type.Integer({ minimum: 1, maximum: 1000 })),
},
{ additionalProperties: false },
);