Skip to content

fix(executors): stop raising a client thinking budget up to 4096 - #14912

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.51from
HouMinXi:fix/14888-thinking-budget-floor
Sep 28, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.51from
HouMinXi:fix/14888-thinking-budget-floor

Conversation

@HouMinXi

Copy link
Copy Markdown
Contributor

Summary

ensureThinkingBudget raised 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 with finish_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_tokens follows the same rule
  • Existing suites whose assertions locked the old raise behaviour were updated and pass: clinepass-thinking-budget, reka-flash-3-always-reasons-13198
  • Defect injection: restoring the raise branch turned the new tests red; removing it turned them green
  • Related suites that feed 4096 as input: 120/120
  • npm run typecheck:core clean; file-size gate clean against upstream/release/v3.8.51

…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
diegosouzapw merged commit 726c9bc into diegosouzapw:release/v3.8.51 Sep 28, 2026
10 of 16 checks passed
@HouMinXi
HouMinXi deleted the fix/14888-thinking-budget-floor branch September 29, 2026 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants