Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 58 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ropoctl
added this pull request to stack #74
September 19, 2026 23:55
added 6 commits
October 14, 2026 18:17
With include=["message.output_text.logprobs"], the text deltas carried logprobs but emit_simple_content_done built its ResponseOutputText without them. Since the terminal response now reuses the streamed items, the completed response lost the logprobs the non-streamed response returns. The streaming state now accumulates each message's delta logprobs. The done part (and therefore the terminal output and stored response) carries them in output_text form with UTF-8 token bytes, matching the non-streamed response exactly, and response.output_text.done carries them too. When none were streamed (not requested), the part keeps logprobs=None as before. The abort test now also asserts the cancelled stream ends with the typed error event (code response_cancelled) that the base branch introduced.
With a reasoning parser active, the non-streamed response reported output_text logprobs for every generated token (reasoning, <think> and </think> included), while the stream reported the whole chunk of any chunk that produced content, so a chunk spanning the end of reasoning leaked its </think> and the two paths disagreed. Parser.content_token_count gives the parser's own token-level reasoning boundary (the engine parser leaves reasoning at the first end marker; a delegating parser uses its reasoning parser's content ids and treats a prompt that already closed reasoning as all-content). The non-streamed response slices its logprobs with it; the stream attributes each chunk by the change in that count and holds content-phase tokens whose text is not surfaced yet (the template scaffold, deferred whitespace) until the next content delta, so streamed and terminal logprobs match the non-streamed response.
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.
Use finalized streamed items as terminal output so item IDs, call IDs, arguments and statuses match events already delivered; preserve cancellation.
Validation: 16 stream/final identity cases and 47 inherited completion/error cases passed on CPU.
Stack base: #52. This PR contains one new commit.
Combined current-main check: all 26 prepared code/tooling branches applied together; 295 tests passed, eight XPU tests skipped, and 22 proxy/auditor fixtures passed. Hardware/model qualification remains as stated above.