Skip to content
Commit Detail

Commit 9b6ae32

Author
Kevin Jain <kevinvikas@cloudflare.com> 2025-06-19 16:05:29 -0500
Parents
7218b3b
Tree
cea5e42
Add support for readable streams in AI binding (#4294)

* Enable AI Binding to accept ReadableStreams

Workers AI is extending its binding to allow for passing ReadableStreams as inputs,
this will only be supported for a few models and will be fully backwards compatible.

For newer models, users will be able to send bigger media files as raw JS ReadableStream
objects. This will result in faster inference and interesting capabilities in future.

* Add tests for ReadableStream inputs

* Lint files

* Implementing code suggestions

* Fix eslint errors

* Refactoring code and modifying tests

* Eslint files

Files changed