Feature/transfer mode stream #1871
Open
+9,628
−12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚧🚧🚧 WORK IN PROGRESS 🚧🚧🚧
Wait with reviewing this PR. Will still do changes.
Opening the PR to start a discussion of how to handle the change.
Current solution runs locally but still behavious differently from API gateway released version (noticed when using browser to access url directly it starts a file download as a stream while if accessing the released aws version it does load the content directly in browser as a stream). So still need some work to sync its behaviour.
Description
This adds support for "Amazon API Gateway Streaming REST apis"
Feature was released in AWS around Nov 19, 2025 and is helpful when developing serverless lambda AI APIs and apis that take longer than the API Gateway timeout limit of 29 seconds.
see https://aws.amazon.com/about-aws/whats-new/2025/11/api-gateway-response-streaming-rest-apis/
Motivation and Context
Modern API's especially serverless lamndas for AI need to stream responses and usually have to be able to run longer than 29 seconds with is the current API limit.
How Has This Been Tested?
Currently tested with my mac m4, node version v22.19.0, with latest osls version with the PR that adds support for streaming api in osls project. Here is the PR in the oss serverless project.
Screenshots (if appropriate):
N/A
Questions/Doubts
A bit confused with the serverless v4 support (master branch) and in case I need to provide an implementation for it to get this merged.
This is only adds support for 13.x branch which can be used with the https://github.com/oss-serverless/serverless project.
Is that ok or you want me to provide a serverless v4 version as well? Would like to avoid it since my time is limited but think maybe it can be relatively fast with some AI voodo magic (or maybe serverless v4 version its not that different?).
@crespowang @dherault what are your opinions?