fix: stream internal model calls with idle timeouts (#5730)

* fix: stream internal model calls with idle timeouts

* fix(providers): reject streams without terminal events
This commit is contained in:
chengyongru authored and GitHub committed 2026-09-11 13:06:43 +08:00
1 parent aeb7b207d7
commit 73410e0217
60 files changed
+815 -795

No files matched your search

+2 -2
View File
@@ -110,7 +110,7 @@ async def test_loop_binds_request_context_for_tool_execution(tmp_path: Path) ->
provider = MagicMock()
calls = {"n": 0}
async def chat_with_retry(**_kwargs):
async def chat_stream_with_retry(**_kwargs):
calls["n"] += 1
if calls["n"] == 1:
return LLMResponse(
@@ -119,7 +119,7 @@ async def test_loop_binds_request_context_for_tool_execution(tmp_path: Path) ->
)
return LLMResponse(content="done", tool_calls=[])
provider.chat_with_retry = chat_with_retry
provider.chat_stream_with_retry = chat_stream_with_retry
provider.get_default_model.return_value = "test-model"
loop = AgentLoop(