feat: add a required first-token event to the transport port
Transport.complete gains the keyword-only first_token_event (no default, per the port convention): streaming sets it on the first delta, the non-streaming path accepts it but never sets it, None means the caller does not observe the first token. All fake/wrapping transports and the three direct call sites follow the signature; the e2e wrapper forwards. Red-green evidence: tests/outputs/137/t1/ (batch A TypeError red, then 147 file tests + 1550 unit tests green).
This commit is contained in:
@@ -75,7 +75,9 @@ class ScriptedTransport:
|
||||
# 取消用例的确定性窗口(同 test_retry FakeTransport): 进入挂起即置位
|
||||
self.entered = asyncio.Event()
|
||||
|
||||
async def complete(self, *, messages, source, stream, overlay, call_id, reasoning_effort):
|
||||
async def complete(
|
||||
self, *, messages, source, stream, overlay, call_id, reasoning_effort, first_token_event
|
||||
):
|
||||
self.calls.append(source.name)
|
||||
if self.hang:
|
||||
self.entered.set()
|
||||
|
||||
Reference in New Issue
Block a user