Skip to content

feat: add X-Accel-Buffering header to SSE streaming responses - #10078

Open
SiAgentBuild wants to merge 2 commits into
agno-agi:mainfrom
SiAgentBuild:feat/sse-x-accel-buffering
Open

SiAgentBuild wants to merge 2 commits into
agno-agi:mainfrom
SiAgentBuild:feat/sse-x-accel-buffering

Conversation

@SiAgentBuild

Copy link
Copy Markdown
Contributor

Summary

All AgentOS SSE streaming endpoints (agent / team / workflow runs, A2A streaming, AG-UI) now send the X-Accel-Buffering: no response header, so reverse proxies such as nginx stream events through instead of buffering them.

Without this header, a default nginx proxy_pass deployment 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 StreamingResponse construction site (30 sites across os/routers and os/interfaces), so there is no middleware overhead on the hot streaming path.

Issue number: #10077

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Improvement
  • Model update
  • Other:

Checklist

  • Code complies with style guidelines
  • Ran format/validation scripts (./scripts/format.sh and ./scripts/validate.sh)
  • Self-review completed
  • Documentation updated (comments, docstrings)
  • Examples and guides: Relevant cookbook examples have been included or updated (if applicable)
  • Tested in clean environment
  • Tests added/updated (if applicable)

Additional Notes

./scripts/validate.sh reports 3 mypy errors in libs/agno/agno/models/anthropic/claude.py and libs/agno/agno/models/aws/claude.py; these exist on main and are unrelated to this change. No new public API surface is added, so no docstring or cookbook updates are required.

@SiAgentBuild
SiAgentBuild requested a review from a team as a code owner September 9, 2026 01:55
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

PR Triage

Missing 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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant