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

+1 -1
View File
@@ -218,7 +218,7 @@ async def test_next_model_request_clears_exhaustion_within_the_same_turn() -> No
delivery = TurnDeliveryFactory(bus).create(msg, msg.session_key)
await delivery.events.emit(RetryStatusEvent("exhausted", 4, 4, "connection"))
with patch("nanobot.providers.base.asyncio.sleep", new_callable=AsyncMock):
response = await Provider(provider_name="test").chat_with_retry(
response = await Provider(provider_name="test").chat_stream_with_retry(
[{"role": "user", "content": "continue"}],
provider_context=ProviderCallContext(events=delivery.events),
)