Repository navigation
fix(core): generate titles at the lowest model variant - #51939
Merged
Merged
Conversation
3 tasks done
rekram1-node
force-pushed
the
title-lowest-variant
branch
from
October 21, 2026 03:07
cd352fb to
9555fba
Compare
5 tasks
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.
Issue for this PR
No linked issue.
Type of change
What does this PR do?
When a provider has no small model, title generation ran on the session model at the session's selected variant, so reasoning models spent their full reasoning budget on a title (Kimi K2.6 used ~1,300 reasoning tokens, Meta Muse ~1,450).
Title model selection is now:
noneorminimalwhen the model has one, since those always reduce reasoning.lowonly when it ranks below the variant the session selected. On some models (for example Claude) the default variant does not reason andlowturns reasoning on, solowis never chosen over the default.title.ts).If no lower variant applies, the title uses the session model at its selected variant in a single attempt.
How did you verify your code works?
packages/core/test/session-title.test.tsfor the lower-variant path, the fallback to the selected variant on failure, no lower variant, a default selection that skipslow, and a default selection that usesnone. All 20 title tests pass;bun typecheckpasses inpackages/core.moonshotai/kimi-k2.6: the title request used about 524 input, 6 output, and 1 reasoning token (previously ~1,336 reasoning tokens).Screenshots / recordings
Not applicable.
Checklist