Repository navigation
feat: add X-Accel-Buffering header to SSE streaming responses - #10078
Open
SiAgentBuild wants to merge 2 commits into
Open
SiAgentBuild wants to merge 2 commits into
SiAgentBuild wants to merge 2 commits into
Conversation
Contributor
PR TriageMissing tests: This PR modifies source code but does not include any test changes. Please add or update tests to cover your changes. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
All AgentOS SSE streaming endpoints (agent / team / workflow runs, A2A streaming, AG-UI) now send the
X-Accel-Buffering: noresponse header, so reverse proxies such as nginx stream events through instead of buffering them.Without this header, a default nginx
proxy_passdeployment buffers the upstream response: clients receive streamed events in delayed bursts, or only after the whole run completes. FastAPI/Starlette flushes every chunk correctly — the buffering happens at the proxy layer, and this header is nginx's documented per-response opt-out. It is inert for direct connections and ignored by proxies that don't recognize it.The header is added directly at each
StreamingResponseconstruction site (30 sites acrossos/routersandos/interfaces), so there is no middleware overhead on the hot streaming path.Issue number: #10077
Type of change
Checklist
./scripts/format.shand./scripts/validate.sh)Additional Notes
./scripts/validate.shreports 3 mypy errors inlibs/agno/agno/models/anthropic/claude.pyandlibs/agno/agno/models/aws/claude.py; these exist onmainand are unrelated to this change. No new public API surface is added, so no docstring or cookbook updates are required.