fix(streaming): skip streamer acquisition when SendResponse is false
Heartbeat messages set SendResponse=false but the streaming path was unconditionally acquiring a streamer, causing HEARTBEAT_OK to leak to Telegram via streamer.Finalize().
This commit is contained in:
parent
9792df6fda
commit
2d5f320168
1 changed files with 1 additions and 1 deletions
|
|
@ -740,7 +740,7 @@ func (al *AgentLoop) runLLMIteration(
|
|||
// Check if both the provider and channel support streaming
|
||||
streamProvider, providerCanStream := agent.Provider.(providers.StreamingProvider)
|
||||
var streamer bus.Streamer
|
||||
if providerCanStream && !constants.IsInternalChannel(opts.Channel) {
|
||||
if providerCanStream && opts.SendResponse && !constants.IsInternalChannel(opts.Channel) {
|
||||
streamer, _ = al.bus.GetStreamer(ctx, opts.Channel, opts.ChatID)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue