Skip to content

fix(core): generate titles at the lowest model variant - #51939

Merged
rekram1-node merged 2 commits into
devfrom
title-lowest-variant
Oct 21, 2026
Merged

rekram1-node merged 2 commits into
devfrom
title-lowest-variant

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

No linked issue.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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:

  1. The provider's small model at its lowest variant (unchanged).
  2. Otherwise, the session model at a lower variant:
    • none or minimal when the model has one, since those always reduce reasoning.
    • low only when it ranks below the variant the session selected. On some models (for example Claude) the default variant does not reason and low turns reasoning on, so low is never chosen over the default.
  3. If that attempt fails, the session model at the selected variant (the existing fallback in 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?

  • Added tests in packages/core/test/session-title.test.ts for the lower-variant path, the fallback to the selected variant on failure, no lower variant, a default selection that skips low, and a default selection that uses none. All 20 title tests pass; bun typecheck passes in packages/core.
  • Live run on 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

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@rekram1-node
rekram1-node merged commit 5c52626 into dev Oct 21, 2026
13 of 14 checks passed
@rekram1-node
rekram1-node deleted the title-lowest-variant branch October 21, 2026 03:11
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.

1 participant