Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update edge-runtime to latest (#51944)
### What? The updates `edge-runtime` to the latest version ### Why? vercel/edge-runtime#428 fixes `consumeUint8ArrayReadableStream` so that when we break iteration early (due to client disconnect), we cleanup the inner stream. That will fire the stream's `cancel` handler, and allow devs to disconnect from an AI service fetch. ### How? `edge-runtime` maintain a `try {} finally {}` over the inner stream's iteration. When we early break, JS will call `it.return()`, and that will resume `consumeUint8ArrayReadableStream` with an abrupt completion (essentially, the `yield` turns into a `return`). We'll be able to trigger the `finally {}` block with that, and we call `inner.cancel()` to cleanup. Fixes vercel/ai#90
- Loading branch information