fix(agent-runner): aggregate non-streaming replies

This commit is contained in:
huanghuoguoguo
2026-07-15 08:48:14 +08:00
parent 730d52bcd0
commit 0060edaf3e
6 changed files with 86 additions and 7 deletions
+3 -2
View File
@@ -384,8 +384,8 @@ class TestChatHandlerAsyncBehavior:
assert query.resp_messages[0].content == 'Hello World!'
@pytest.mark.asyncio
async def test_non_streaming_no_pop(self):
"""Non-streaming mode: all chunks should remain."""
async def test_non_streaming_keeps_results_and_yields_once(self):
"""Non-streaming mode keeps runner results but runs downstream stages once."""
from langbot.pkg.pipeline.process.handlers.chat import ChatMessageHandler
from langbot.pkg.pipeline import entities
@@ -424,6 +424,7 @@ class TestChatHandlerAsyncBehavior:
assert len(query.resp_messages) == 2
assert query.resp_messages[0].content == 'Response 1'
assert query.resp_messages[1].content == 'Response 2'
assert len(results) == 1
@pytest.mark.asyncio
async def test_agent_turn_recreates_conversation_if_tool_resets_it(self):