Repository navigation
Conversation
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s). |
chaojixinren
left a comment
There was a problem hiding this comment.
Which actual provider exhibits this behavior, and what existing OCR configuration triggers it? Without a real reproduction, I’d treat this as low-priority compatibility hardening rather than a confirmed bug fix.
NanaseInori
left a comment
There was a problem hiding this comment.
Reviewed both changed files and the surrounding streaming accumulator/status handling at this head. The populated terminal output is now preserved only after status validation; empty terminal output still falls back to sorted item-done events. The strict ChatGPT completion gate and the existing size checks in add() remain in place. The new fixtures cover terminal-only/partial item delivery, unsuccessful statuses, usage, and function-call/encrypted-reasoning preservation. I found no blocking code defect in this change.
The terminal envelope is a sensible authority: the official Responses streaming reference defines response.completed as carrying the completed response. However, that does not establish that a real supported endpoint omits item-done events. The existing request for a concrete provider/configuration reproduction is still unanswered here. I would describe the present evidence as deterministic compatibility hardening and leave acceptance/priority to the maintainers, rather than claim a confirmed production incident.
The symptom search did not identify another direct terminal-output-preservation patch. No linked issue is claimed. This is a source-and-test review; I did not independently execute the repository suite, perform a live-provider run, or verify the reported merge-order experiments.
This review was conducted by NanaseInori's review bot, using the model GPT-6 Astra Pro. If you need a human review, please manually @NanaseInori.
Description
Ordinary Responses streams currently replace the terminal response's
outputwith the collectedresponse.output_item.doneitems. If an endpoint supplies a populated terminal response but omits some or all item-done events, OCR returns success while dropping text, function calls, and native reasoning. The ChatGPT-plan path already preserves populated terminal output.Preserve populated terminal output for ordinary streams too, after validating the terminal status. Reconstruct from item-done events only when terminal output is empty. Strict ChatGPT completion checks and the existing stream-size limit remain in place.
Type of Change
How Has This Been Tested?
The new tests failed against upstream
0d403392073bcb0d3894c5364b0a85e7b6a47e0d: terminal-only output became[], partial item events dropped the terminal answer, and the HTTP/SSE client returned no tool calls.Regression coverage includes:
Validation:
make check: passed (license/English checks, tidy, formatting, vet).make testwith race detection and a coverage profile: all 25 root-module packages passed; total coverage 90.9%,internal/llmcoverage 94.5%.make build: passed.Test environment: Windows amd64, Go 1.26.10, GCC 16.2.0 and portable Git 2.56.0.windows.4. On this machine Make was invoked as
mingw32-makewith Git Bash and a local Go wrapper to keep the portable Git first on PATH. The initial run with system Git 2.33.1 failed ininternal/toolbecause it lacksgit grep --max-count; the full suite passes with supported Git. No source changes were made for that environment issue.This is a deterministic compatibility fixture, not a claim of a live-provider incident.
ocr review --audience agent --background ...was attempted but could not run because no OCR LLM endpoint is configured locally.Checklist
make checkpasses.license/claon fix(llm): report a request's total wall clock, not just per-attempt timings #1788; this PR's check will be verified after submission.AI disclosure: OpenAI Codex (GPT-6), the GitHub CLI, and local Go tooling were used for repository inspection, implementation, code inspection, and automated validation. Validation was performed by the assistant; a separate personal review by the contributor is not claimed. No AI commit trailers or explicit reviewer requests are included. Maintainer questions require the contributor's own understanding under the repository's contribution rules.
Related Issues / Overlap
No existing issue or PR addressing this terminal-output loss was found in the open Issue/PR inventory, related closed/merged searches, or patches of open PRs touching
responses_client.go. #1604 changes truncation/finish-reason handling rather than this accumulator behavior.#1788 shares
responses_client.gobut changes stream timing in a separate function. Both merge orders were checked against current main and produce the same tree; the combined LLM race suite also passes. This branch contains only this fix, with no commits from #1788.