Skip to content

fix(combo): trust finish_reason stop over the reasoning-ratio heuristic (carries #14980) - #15020

Merged
diegosouzapw merged 1 commit into
release/v3.8.51from
fix/combo-trust-finish-stop-14980
Sep 28, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.51from
fix/combo-trust-finish-stop-14980

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Carries the one commit of #14980 by @HouMinXi that matches its title, cherry-picked unchanged (authorship preserved) onto the current release/v3.8.51. #14980 also carried ~20 unrelated deploy-branch commits (grok-bot tool bridge executor, Opus 5.5 defaults, rebaselines), so only 4a03936 lands here.

What changes

The combo quality gate now trusts an explicit finish_reason: "stop" over the reasoning-ratio heuristic: a response that stopped normally with reasoning but no visible text is accepted instead of failing the combo over. This intentionally changes the contract pinned by the 2026-09-01 client audit (finish_reason:stop + empty content + reasoning → ratio heuristic still applies); the maintainer approved the policy change for this wave.

Validation

  • tests/unit/combo-quality-validator-reasoning.test.ts + tests/unit/validate-response-quality.test.ts: 33/33 on the current tip.
  • Boarded with the 38-PR merge-batch of 2026-09-28: typecheck core/open-sse clean.

Supersedes #14980. Thank you @HouMinXi!

Co-authored-by: Minxi Hou houminxi@gmail.com

The 90% reasoning-ratio check rejects responses where reasoning fills
the budget and visible content is empty. That is correct for models
that optionally think and run out of budget mid-reasoning, but it
misfires on models that cannot disable thinking: Claude Opus 4.7+ and
GLM-5.3 both spend most of their output on reasoning and still finish
normally with finish_reason "stop".

OpenAI, Anthropic, and Z.ai all document "stop" as a natural end of
turn and "length"/"max_tokens" as truncation. Trust the stop signal
and keep the ratio check only as the fallback when the provider
reports no finish_reason.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
(cherry picked from commit 4a03936)
@diegosouzapw
diegosouzapw merged commit 81c9b6d into release/v3.8.51 Sep 28, 2026
11 checks passed
diegosouzapw added a commit that referenced this pull request Sep 29, 2026
…d release date

- Every one of the 1972 cycle commits is covered by a bullet (reconcile-changelog
  vs origin/release/v3.8.50); fragments folded under [3.8.51] with the PR link
  and the author of the commit that added them.
- Re-land credit: #15019/#15020/#15119/#15120/#15121 credit @HouMinXi; #12383
  credits its author @kareem-jalal alongside the original credit.
- Contributors hall regenerated (301 external contributors).
- [3.8.51] dated 2026-09-29 in the root CHANGELOG and the 66 i18n mirrors.
@diegosouzapw diegosouzapw mentioned this pull request Sep 29, 2026
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