diff --git a/src/routes/admin/ai.ts b/src/routes/admin/ai.ts index 261323b..a6ef126 100644 --- a/src/routes/admin/ai.ts +++ b/src/routes/admin/ai.ts @@ -19,7 +19,9 @@ import { export default async function aiRoutes(app: FastifyInstance): Promise { await app.register(multipart, { - limits: { fileSize: config.nas.maxUploadSize }, + // Cap files per request: the budget re-check already bounds *spend* mid-batch, + // but this bounds the work (one vision call per file) of a single request. + limits: { fileSize: config.nas.maxUploadSize, files: 20 }, }); // GET /api/admin/ai/usage — current-month spend + budget