Patch Changes
-
20565b8: security: prevent unbounded memory growth in download functions
The
download()anddownloadBlob()functions now enforce a default 2 GiB size limit when downloading from user-provided URLs. Downloads that exceed this limit are aborted with aDownloadErrorinstead of consuming unbounded memory and crashing the process. TheabortSignalparameter is now passed through tofetch()in all download call sites.Added
downloadoption totranscribe()andexperimental_generateVideo()for providing a custom download function. Use the newcreateDownload({ maxBytes })factory to configure download size limits.