Conversation
merceod
force-pushed
the
engine/chat-stream-errors
branch
2 times, most recently
from
September 23, 2026 23:14
0f6dfa0 to
105bc2a
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
APIServer.iter_result_chunksalready reports a request that fails after its stream opened (an engine error mid generation, a delivery timeout) as a terminalerrorchunk, and/generateand/v1/videosforward it. The/v1/chat/completionsSSE path dropped it and closed withfinish_reason: "stop", so a truncated answer read as a complete one. I ran into this while benchmarking concurrent Cosmos3-Edge reasoner requests, where worker errors showed up as short answers with a normal stop and the throughput numbers counted them.The stream now ends with an OpenAI-style error event and
[DONE], nostopchunk, matching the router's non-streaming error body.Test in
test/modular/test_openai_router.py::test_chat_stream_reports_a_failed_request_in_band(stubbed API).ruffandtest/modularpass.