What changed: streamTranslated ended a translated reply in "the reply
ended before it was complete" when an Anthropic upstream's stream stopped
with no stop_reason and no message_stop; a Responses upstream's stream
that stopped with no terminal event (no response.completed,
response.incomplete, response.failed) was still finished as if whole, and
the agent's turn ended a few words in with nothing to say why — the same
reply the passthrough already tells apart (sniff.whole, #370). It now
ends in the same error, asked again in place where the upstream goes on
from a prefill, as an Anthropic cut is. The event that ends a stream is
read by its type as the passthrough reads it (upstreamEnds, was
anthropicEnds, already lastEvent), so a response.completed carrying no
status field still counts as the reply's last. Chat (may end without
[DONE] and be whole) and Gemini stay as the passthrough treats them.
Run (review, yetone's session): TestResponsesUpstreamEndedShort passes;
with the Responses half of the end check taken out by hand it fails
("a cut reply finished as whole", finish_reason "stop", no error).
TestRelayStream*, TestRelayStop* ok. The full suite, gofmt and the
cross-OS vets are in the series' last commit.
Author's run: the red/green above, -race -count=20 on the relay-stop
tests, gofmt, go vet and go build on darwin, linux, windows, go test
./... (TestOffline red on the clean baseline too, offline machine).
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>