Severity: Medium — file()/video() don't forward the computed MIME → server sees application/octet-stream
Both builders compute mime but use it only for the blacklist check; format is added to the part only if the caller passes one. For an https-URL file/video part with no explicit format, the server has no data-URL to read the MIME from and falls back to:
// src/helpers/message.ts:318
mediaType: c.file?.format || dataUrlMime || "application/octet-stream"
So video("https://.../clip.mp4") reaches model selection as application/octet-stream, undercutting video/file support. (Data-URL parts are unaffected — the server extracts their MIME. The server only lifts MIME-by-extension for URLs found in text, not for explicit file parts.)
Fix
Always forward the computed MIME as format from file()/video() (and autoPart).
Severity: Medium —
file()/video()don't forward the computed MIME → server seesapplication/octet-streamBoth builders compute
mimebut use it only for the blacklist check;formatis added to the part only if the caller passes one. For an https-URLfile/videopart with no explicit format, the server has no data-URL to read the MIME from and falls back to:So
video("https://.../clip.mp4")reaches model selection asapplication/octet-stream, undercutting video/file support. (Data-URL parts are unaffected — the server extracts their MIME. The server only lifts MIME-by-extension for URLs found in text, not for explicitfileparts.)Fix
Always forward the computed MIME as
formatfromfile()/video()(andautoPart).