Skip to content

fix(responses): a truncated non-streaming Chat turn reaches a Responses client as incomplete - #16517

Merged
diegosouzapw merged 2 commits into
cheaper-inference:release/v3.8.52from
pacocartones:fix/responses-client-incomplete
Oct 15, 2026
Merged

diegosouzapw merged 2 commits into
cheaper-inference:release/v3.8.52from
pacocartones:fix/responses-client-incomplete

Conversation

@pacocartones

Copy link
Copy Markdown
Contributor

Summary

  • When a Chat Completions upstream served a /v1/responses client without streaming, the response always said status: "completed", even when the upstream stopped on length or content_filter. The client had no signal that the output was cut off.
  • After the conversion, the non-streaming path now applies finalizeResponsesTerminalStatus, the rule the streaming path got in fix(responses): surface truncated generations as response.incomplete, not completed #14806, so the client gets status: "incomplete" with incomplete_details.
  • The change is at the call site in chatCore/nonStreamingClientTranslate.ts, because responseSanitizer.ts is at its frozen file-size ceiling.

Related Issues

Target Branch

  • Base is the active release/v3.8.x branch (the highest open release/v*), not main
  • New feature? From 3.8.55 on it is held with the v4-feature label for the v4 channel

Validation

  • Change type: other (responses / chatCore)
  • Focused tests and category gates from the golden path
  • npm run lint (eslint on the changed files: clean)
  • Reconciled with the current active release base; focused checks rerun afterward
  • Production-code changes include a new or updated automated test in this PR

Tests Added Or Updated

  • tests/unit/responses-client-incomplete-nonstreaming.test.ts (new): 3 tests through translateNonStreamingClientResponse. 2 fail on the base and all 3 pass with the fix. The one that already passes checks that a clean stop stays completed.

Coverage Notes

  • open-sse/handlers/chatCore/nonStreamingClientTranslate.ts, Responses client branch.

Reviewer Notes

  • A native Responses body (no choices) is not touched: it keeps the upstream's own status.
  • On the previous release head (7f3cbb0) the 4 test files that import these modules passed 34/34. On the current head (e23fb0f) the new test is 3/3 with the fix and 2/3 fail without it.
    ⚠️ base-red inherited: 🔴 Release branch not green: release/v3.8.52 #15306

…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.
@diegosouzapw
diegosouzapw merged commit 502d25f into cheaper-inference:release/v3.8.52 Oct 15, 2026
29 of 51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants