Problem Statement. Today the limit is a single global max_bytes. Routes that handle
genomic files (/v1/ai/humanitarian/verify with attached evidence) and routes that
handle OCR images at low MB have different ceilings.
Technical Context. app/ai-service/main.py::MaxRequestBodySizeMiddleware.
Expected Outcome. A RouteBodySize(max_bytes=N) decorator enriches routes with their
own limit; middleware honours route-specific value when present.
Acceptance Criteria.
/v1/ai/upload-large declared with max_bytes=64*1024*1024 returns 413 only on 64
MiB+.
- Default unchanged.
Files or modules likely to be affected.
app/ai-service/main.py,
app/ai-service/api/routes.py.
Difficulty. Easy
Estimated effort. S
Backlog item #59 from `docs/maintainer-issue-backlog.md.
Problem Statement. Today the limit is a single global
max_bytes. Routes that handlegenomic files (
/v1/ai/humanitarian/verifywith attached evidence) and routes thathandle OCR images at low MB have different ceilings.
Technical Context.
app/ai-service/main.py::MaxRequestBodySizeMiddleware.Expected Outcome. A
RouteBodySize(max_bytes=N)decorator enriches routes with theirown limit; middleware honours route-specific value when present.
Acceptance Criteria.
/v1/ai/upload-largedeclared withmax_bytes=64*1024*1024returns 413 only on 64MiB+.
Files or modules likely to be affected.
app/ai-service/main.py,app/ai-service/api/routes.py.Difficulty. Easy
Estimated effort. S
Backlog item #59 from `docs/maintainer-issue-backlog.md.