Replace the hand-written FileInfo interface in apps/apollo/src/lib/toolExecutionFiles/fileUpload.ts (line 15) with export type FileInfo = z.infer<typeof RequestFileInfoSchema>. The canonical RequestFileInfoSchema is now defined and exported from fileUpload.ts, making the schema the single source of truth and eliminating the duplicate field list that could drift out of sync.
In request.ts (~line 173), the local RequestFileInfoSchema definition is replaced by an import from fileUpload.ts; a RequestFileInfoSchemaWithDocs variant is created via .extend() to preserve the OpenAPI .describe() annotations on each field. In response.ts (~line 189), the FileInfo type import is removed and the as FileInfo cast is dropped since c.req.valid("json") already returns the structurally-compatible inferred type.
RequestFileInfoSchema and the old FileInfo interface have identical 5 fields (toolkit_slug, tool_slug, filename, mimetype, md5), so no field deltaResponseFileInfoSchema in response.ts has the same 5 fields, making its inferred type structurally assignable to FileInfo; the cast removal is safeRequestFileInfoSchemaWithDocs is a .extend() of RequestFileInfoSchema adding only .describe() metadata, so the inferred type is identical and handleFileUpload(fileInfo, ...) continues to typecheckGenerated with Claude Code