What changed: a Chat stream of Command Code's whose reply ends with no
finish_reason anywhere - esp32gallery's day had 665 requests, 624 ended
with one, and the 20 that didn't were turns its slow starts lost to a
killed worker, each a ledger 200 with no stop and no error while the
client read "Stream ended without finish_reason" - was taken for a
turn that ended as it should, silence in the ledger and a bare
half-reply for the agent. Its API joins Gemini's OpenAI-compatible one
in saysItsEnd: every whole reply of its says its end, so a stream that
stops short of a finish_reason is said as the cut it is, in the stream,
the same way a relayed Gemini one is (#1644) - and one still held, with
nothing of the reply said yet, fails there for the group's next
candidate. Another vendor's Chat stream may still end whole with
neither a finish_reason nor [DONE]: nothing changes there.
Run: Four new tests, the first two red on cef8c1a4a before the change (the
cut passing as a whole reply, the next member never asked):
TestCommandCodeRelayEndedShort, a half-reply cut ends with "the reply
ended before it was complete", no finish_reason filled in;
TestCommandCodeTaillessFailsOver, a held lead-only stream fails 502 for
the next member; TestAnotherChatStreamWithoutAFinishReasonStaysAsItCame,
another vendor's tailless stream goes as it came; and
TestCommandCodeRelayWholeStaysWhole, a finished reply is never given a
second end.
TestGeminiCompatRelayEndedShort and TestGeminiCompatTranslatedEndedShort
green throughout. Not tried: a real Command Code upstream (the frames
are the reporter's ledger shapes, the host the one balance.go reads).
Generated-by: GLM-5.3-Flash (ZCode)