feat(llmloop): backfill comment thinking from turn output - #773
Open
yingjiexu2002 wants to merge 1 commit into
Open
feat(llmloop): backfill comment thinking from turn output#773yingjiexu2002 wants to merge 1 commit into
yingjiexu2002 wants to merge 1 commit into
Conversation
… message Expose ChatResponse.ReasoningContent and backfill per-comment thinking with the current turn's reasoning content, falling back to the assistant message for models that do not expose reasoning, so --format json output carries thinking even when the model omits it.
Contributor
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 2 selected item(s). |
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.
Description
Comments parsed from
code_commenttool calls have a runtime-onlythinkingfield that most models never populate (it is deliberately not advertised in the tool schema). This PR backfills it from the model's output of the current turn, so--format jsonoutput carries the review reasoning:ChatResponse.ReasoningContent()to expose the native reasoning content of a response (OpenAIreasoning_contentin both streaming and non-streaming paths; Anthropic thinking blocks).thinkingis empty. Explicit model-provided thinking always wins.renderCommentdoes not render thinking); only the JSON output gains the field.Type of Change
How Has This Been Tested?
make testpasses locallyAdded unit tests: backfill uses the turn's thinking text when a comment has no explicit thinking; explicit thinking is preserved; no backfill when the turn has no thinking text. Also verified end-to-end with a local review run (
--format json) against providers with and without native reasoning output.Checklist
go fmt,go vet)Related Issues
N/A