FastAPI 0.165 adds form_limits for max fields, files and part size. Set them per app, router or endpoint and pair them with max_body_size for safety.