You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Answer streaming stops after an LLM runs out of retries and uses a default value #413
I ran Start → LLM → Answer 1 → Answer 2 with two retries and a default text of fallback.
The LLM sent partial and failed. Both retries failed before sending any text.
Answer 1 uses A[{{#llm.text#}}]END and Answer 2 says |NEXT.
Both Answers finish, and the run output is A[fallback]END|NEXT.
The stream stops at A[partial. Once the default takes over, the client should still get ]END and |NEXT.
This points to a root response-filter cursor that never gets released. At eb75e38, root chunks go into stream_buffers, but retry handling and finish_source() close only the separate source_streams used by child frames. So the handled exception does not close the root llm.text buffer. [1][2]
Once partial has been buffered, _read_root_variable_chunks() refuses the variable-pool fallback because has_stream_events is true. Without a closed selector, it also refuses to advance past llm.text. That explains why committing fallback does not release ]END or the following Answer. [3]
The fix direction is to settle the root source when retries terminate in a handled failure, preserving already displayed text while allowing the template cursor to advance. Closing on every retry would be premature because later attempts can still emit chunks. Your reproduction makes a useful regression assertion: the concatenated stream should be A[partial]END|NEXT, independently of the completed output using fallback. This follows the filter's existing separation between source closure and variable-value fallback. [4]
Activity
dosubot commentedon Nov 18, 2026
This points to a root response-filter cursor that never gets released. At
eb75e38, root chunks go intostream_buffers, but retry handling andfinish_source()close only the separatesource_streamsused by child frames. So the handled exception does not close the rootllm.textbuffer. [1] [2]Once
partialhas been buffered,_read_root_variable_chunks()refuses the variable-pool fallback becausehas_stream_eventsis true. Without a closed selector, it also refuses to advance pastllm.text. That explains why committingfallbackdoes not release]ENDor the following Answer. [3]The fix direction is to settle the root source when retries terminate in a handled failure, preserving already displayed text while allowing the template cursor to advance. Closing on every retry would be premature because later attempts can still emit chunks. Your reproduction makes a useful regression assertion: the concatenated stream should be
A[partial]END|NEXT, independently of the completed output usingfallback. This follows the filter's existing separation between source closure and variable-value fallback. [4]To reply, just mention @dosu.
Docs are dead. Just use Dosu.