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:
1 parent
aeb7b207d7
commit
73410e0217
60 files changed
+815
-795
No files matched your search
@@ -34,7 +34,7 @@ class TestNewCommandArchival:
|
||||
model="test-model",
|
||||
context_window_tokens=1,
|
||||
)
|
||||
loop.provider.chat_with_retry = AsyncMock(
|
||||
loop.provider.chat_stream_with_retry = AsyncMock(
|
||||
return_value=LLMResponse(content="ok", tool_calls=[])
|
||||
)
|
||||
loop.tools.get_definitions = MagicMock(return_value=[])
|
||||
@@ -113,7 +113,7 @@ class TestNewCommandArchival:
|
||||
assert len(scheduled) == 1
|
||||
await scheduled[0]
|
||||
await loop.aclose()
|
||||
sent = loop.provider.chat_with_retry.call_args.kwargs["messages"]
|
||||
sent = loop.provider.chat_stream_with_retry.call_args.kwargs["messages"]
|
||||
assert sent[1:-1] == ordinary_history
|
||||
assert sent[-1]["content"] == _ARCHIVE_PROMPT
|
||||
|
||||
|
||||
Reference in new issue
Block a user