Conversation
Hub auto models can spend max_tokens on reasoning_content and return HTTP 200 with an empty message.content. extractChatContent now errors clearly on empty content, recovers an embedded JSON object from reasoning when present, and review generation requests 12288 max_tokens so reasoning plus a full Chinese review can both fit. Co-authored-by: Daniel <znsoft@163.com>
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.
Hub
autoreasoning models can return HTTP 200 while spendingmax_tokensonreasoning_contentand leavingmessage.contentempty.extractChatContentpreviously returned that empty string, soparseReviewAnalysisfailed withunexpected end of JSON inputonPOST /papers/review/{id}/generate.Changes
reviewMaxTokensfrom 2500 to 12288 so reasoning plus a full four-section Chinese JSON review can fit.extractChatContent:empty chat content (finish_reason=…))reasoning_content/reasoningwhen presentparseReviewAnalysisrejects empty input withempty analysis JSONinstead of a raw JSON EOF.Base
Stacked on
cursor/papers-translate-concurrency-7d3b(merge target of the 解读 review feature, PR #11).maindoes not yet include papers review generation.Tests
go test ./...passes, including:TestExtractChatContentShapesTestGenerateReviewOpenAIReasoningOnlyTestGenerateReviewOpenAIEmptyContentErrorTestReviewMaxTokensBudget