fix(executors): stop raising a client thinking budget up to 4096 - #14912
Merged
diegosouzapw merged 1 commit intoSep 28, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
…uzapw#14888) ensureThinkingBudget lifted every positive max_tokens below 4096 up to that floor whenever the model's output cap was larger. On Kimi K3 with effort max the whole 4096 window went to reasoning and the reply came back empty with finish_reason length. A budget the client chose is now left as-is; the floor only fills in when the field is missing or non-positive. The existing tests asserted the raise, so they now assert the value survives. A new suite covers both token fields and the omitted-budget case. Signed-off-by: Minxi Hou <houminxi@gmail.com>
diegosouzapw
merged commit Sep 28, 2026
726c9bc
into
diegosouzapw:release/v3.8.51
10 of 16 checks passed
5 tasks done
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.
Summary
ensureThinkingBudgetraised any positive client budget below 4096 up to 4096 whenever the model output cap was larger than that budget. On Kimi K3 with effort max, that 4096 window was spent entirely on reasoning and the reply came back empty withfinish_reason: length.A budget the client set is now left alone. The 4096 floor applies only when the client omitted the field or sent a non-positive number.
Related to #14888. #14888 stays open.
Test plan
tests/unit/thinking-budget-client-floor-14888.test.ts(3): a client value of 1024 stays 1024, an omitted budget gets 4096,max_completion_tokensfollows the same ruleclinepass-thinking-budget,reka-flash-3-always-reasons-13198npm run typecheck:coreclean; file-size gate clean againstupstream/release/v3.8.51