Repository navigation
fix(responses): a truncated non-streaming Chat turn reaches a Responses client as incomplete - #16517
Merged
diegosouzapw merged 2 commits intoOct 15, 2026
Conversation
…es client as incomplete A Chat upstream's length or content_filter finish was converted for a Responses client with status completed, so the client had no signal that the output was cut off. Apply the streaming path's terminal status rule (cheaper-inference#14806) after the non-streaming conversion.
Merged
6 of 7 tasks
diegosouzapw
merged commit Oct 15, 2026
502d25f
into
cheaper-inference:release/v3.8.52
29 of 51 checks passed
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.
Summary
/v1/responsesclient without streaming, the response always saidstatus: "completed", even when the upstream stopped onlengthorcontent_filter. The client had no signal that the output was cut off.finalizeResponsesTerminalStatus, the rule the streaming path got in fix(responses): surface truncated generations as response.incomplete, not completed #14806, so the client getsstatus: "incomplete"withincomplete_details.chatCore/nonStreamingClientTranslate.ts, becauseresponseSanitizer.tsis at its frozen file-size ceiling.Related Issues
Target Branch
release/v3.8.xbranch (the highest openrelease/v*), notmainv4-featurelabel for the v4 channelValidation
npm run lint(eslint on the changed files: clean)Tests Added Or Updated
tests/unit/responses-client-incomplete-nonstreaming.test.ts(new): 3 tests throughtranslateNonStreamingClientResponse. 2 fail on the base and all 3 pass with the fix. The one that already passes checks that a cleanstopstayscompleted.Coverage Notes
open-sse/handlers/chatCore/nonStreamingClientTranslate.ts, Responses client branch.Reviewer Notes
choices) is not touched: it keeps the upstream's own status.