Repository navigation
Studio: report a cut off /v1/responses turn as incomplete - #10225
Conversation
|
Confirmed this hits studio/backend/routes/inference.py, where the non-streaming path hardcodes status completed and the stream always terminates on response.completed, so a cut off turn is indistinguishable from a finished one. Will get this reviewed. |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ba71369b6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if healer is not None and healer.healed: | ||
| stream_finish_reason = "tool_calls" |
There was a problem hiding this comment.
Preserve
length when healing streamed tool calls
When a model emits a healable text-form tool call and llama-server ends the same turn with finish_reason: "length", healer.healed is true and this assignment overwrites the truncation reason before truncated is computed. The adapter consequently emits response.completed and records tool_calls, hiding exactly the cutoff this change is intended to expose; only replace a natural stop reason here, while allowing length to remain authoritative.
Useful? React with 👍 / 👎.
| status = "incomplete" if truncated else "completed", | ||
| incomplete_details = ({"reason": "max_output_tokens"} if truncated else None), |
There was a problem hiding this comment.
Mark truncated output messages incomplete
For a finish_reason: "length" response containing text, the new top-level status becomes incomplete, but the associated ResponsesOutputMessage is still constructed with status: "completed" (and its model cannot represent incomplete); the streaming path likewise closes the active message as completed before placing it in the terminal snapshot. Clients that inspect output-item status can therefore still treat the cut-off answer as finished, so propagate the truncation state to the affected output item as well.
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Validated exact head Buffered and streaming Responses truncations now end incomplete. The Responses adapter and adjacent monitor suites passed, 291 tests total. Independent review covered 27/27 obligations with zero surviving findings. Exact-head security scans were clean. CI is terminal: 44 successful checks, 4 skipped checks, 0 pending checks, and 0 failed checks. GitHub exposes no required status-check configuration for This is a backend-only JSON/SSE change, so browser screenshots and UI evidence are not applicable. The PR remains open with |
A turn that runs out of output tokens still says status completed with no detail, and the stream ends on response.completed, so a client cannot tell half an answer from a finished one. Anyone driving a local model through /v1/responses hits this, including Codex behind unsloth start.
It now reports status incomplete with a reason of max_output_tokens, and the stream ends on response.incomplete. Tested against a running llama-server with a small output limit: the reply said completed with no detail before, and incomplete with max_output_tokens after.