mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
StreamHeartbeat chunks were being yielded from tool execution
(to keep SSE connections alive during long-running operations)
but the main stream_chat_completion handler had no case for them
in its elif chain. They fell through to the 'Unknown chunk type'
error path, generating Sentry errors (AUTOGPT-SERVER-7JA).
Fix: Add StreamHeartbeat to the elif chain and yield it through
so it reaches the route handler which calls to_sse() on it,
producing the expected SSE comment format (': heartbeat').