Repository navigation
On-demand titles read only the newest messages and never mistake a retired default model for an empty chat - #13
Merged
Conversation
pushTitle and textTitle feed title requests only, ahead of the E2E Title auto-answer; the main queue, matched or not, never serves a title request. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…tired default model for an empty chat - title scans newest first and stops once the window and the newest user message are found, instead of loading the whole chat - the newest user message is found beyond the window, so messages: 1 on a chat ending with an answer titles it; no_messages only for an empty window - a model the caller names must exist (unknown_model); a defaulted model that is gone falls back to the default model - providerID and modelID come together or not at all (decode 400) - no title agent is a defect on the on-demand path; the first turn still returns quietly Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…lback and the title queue Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 72 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
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.
Follow-up to PR #12 (the on-demand session title, released as v1.19.3-documentor-pg.3). It fixes the findings of the final whole-branch review.
Findings fixed
titleloaded every page of a chat, with its parts, to use the newest 20. It now collects withsessions.scanNewestFirstand stops once the window is full and the newest real user message is known. The stale-ifTitlecheck still answers before any message is read.unknown_model→ 400 came back, which DocuMentor reads as "nothing to title". Nowunknown_modelis returned only when the caller supplied the pair. On the defaulted path the title falls back toprovider.defaultModel(), and a failure there is a defect (500).messages: 1on a chat ending with an assistant reply, the call answered 400. The newest user message (foruserand the model default) is now found even when it lies beyond the window, andno_messagesfires only for an empty window.TitleInputand the route payload now check that both are given or neither, so one alone is a decode 400.200 { applied: false }. The first-turn step still returns quietly.pushTitle,textTitle), and the main queue never serves a title request. The HttpApi exerciser still relies on theE2E Titleauto-answer.session.title.Tests: new
documentor:cases cover the default-model fallback, the window of one, the missing title agent, and the route's both-or-neither rule. Before the fix each failed as expected (unknown_model,no_messages, a success exit, and 200 instead of 400); now each passes.test/session/prompt.test.ts: 82 pass, 1 skip (the case that was already skipped), 0 fail.test/server/httpapi-session.test.ts: 26 pass.bun run test:httpapi: 209 pass, 0 fail in each of the three modes.bun turbo typecheck: green.🤖 Generated with Claude Code