Add model profiles and generate conversation titles #7

Closed
jacensekai wants to merge 0 commits from model-profiles into master
Owner

Every request went to the one configured model, so titles came from
truncating the first message and summaries used the same (often
expensive) model as the chat.

Config gains profiles: named endpoint/model configurations with their
own temperature, output limit and context window. An empty base URL
reuses the main endpoint and key. tasks picks a profile by name for
titles and for summaries (null is the main model). modelFor(task) in
llm.ts resolves them, falling back to the main model if a profile was
removed. Clients are cached per endpoint, and completeText() collects a
short tool-less completion for internal tasks.

Compaction now uses the summary model, slicing transcripts to its
window and learning its chars-per-token ratio from its usage, while the
summary's length is still set by the main window it ends up in.

A conversation's first message names it after its first line at once,
then generateTitle() asks the title model for a better title in the
background. It replaces the first line only if the conversation wasn't
renamed meanwhile, and a failure only logs. Renames are broadcast on
the global event stream, so the sidebar and header update in every tab.
LLM_GENERATE_TITLES=false (or the Tasks setting) turns it off.

PUT /api/config validates profiles and task references; profile API
keys are masked and kept by name. POST /api/llm/models lists models at
an unsaved profile's endpoint, reusing a saved key only for the URL it
was saved with. Settings → Model gets "Other models" and "Tasks"
sections, and long toggle labels no longer squash their checkbox.

Title generation is off in the test setups since its request would
take scripted mock turns; e2e mock turns can target a model so a title
turn and a reply can't swap.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

Every request went to the one configured model, so titles came from truncating the first message and summaries used the same (often expensive) model as the chat. Config gains `profiles`: named endpoint/model configurations with their own temperature, output limit and context window. An empty base URL reuses the main endpoint and key. `tasks` picks a profile by name for titles and for summaries (null is the main model). modelFor(task) in llm.ts resolves them, falling back to the main model if a profile was removed. Clients are cached per endpoint, and completeText() collects a short tool-less completion for internal tasks. Compaction now uses the summary model, slicing transcripts to its window and learning its chars-per-token ratio from its usage, while the summary's length is still set by the main window it ends up in. A conversation's first message names it after its first line at once, then generateTitle() asks the title model for a better title in the background. It replaces the first line only if the conversation wasn't renamed meanwhile, and a failure only logs. Renames are broadcast on the global event stream, so the sidebar and header update in every tab. LLM_GENERATE_TITLES=false (or the Tasks setting) turns it off. PUT /api/config validates profiles and task references; profile API keys are masked and kept by name. POST /api/llm/models lists models at an unsaved profile's endpoint, reusing a saved key only for the URL it was saved with. Settings → Model gets "Other models" and "Tasks" sections, and long toggle labels no longer squash their checkbox. Title generation is off in the test setups since its request would take scripted mock turns; e2e mock turns can target a model so a title turn and a reply can't swap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add model profiles and generate conversation titles
Some checks failed
CI / Typecheck, build and test (pull_request) Successful in 19s
CI / End-to-end (Playwright) (pull_request) Successful in 58s
CI / Docker images and sandbox (pull_request) Failing after 11s
CI / Compose stack smoke test (pull_request) Failing after 6s
356afa80a4
Every request went to the one configured model, so titles came from
truncating the first message and summaries used the same (often
expensive) model as the chat.

Config gains `profiles`: named endpoint/model configurations with their
own temperature, output limit and context window. An empty base URL
reuses the main endpoint and key. `tasks` picks a profile by name for
titles and for summaries (null is the main model). modelFor(task) in
llm.ts resolves them, falling back to the main model if a profile was
removed. Clients are cached per endpoint, and completeText() collects a
short tool-less completion for internal tasks.

Compaction now uses the summary model, slicing transcripts to its
window and learning its chars-per-token ratio from its usage, while the
summary's length is still set by the main window it ends up in.

A conversation's first message names it after its first line at once,
then generateTitle() asks the title model for a better title in the
background. It replaces the first line only if the conversation wasn't
renamed meanwhile, and a failure only logs. Renames are broadcast on
the global event stream, so the sidebar and header update in every tab.
LLM_GENERATE_TITLES=false (or the Tasks setting) turns it off.

PUT /api/config validates profiles and task references; profile API
keys are masked and kept by name. POST /api/llm/models lists models at
an unsaved profile's endpoint, reusing a saved key only for the URL it
was saved with. Settings → Model gets "Other models" and "Tasks"
sections, and long toggle labels no longer squash their checkbox.

Title generation is off in the test setups since its request would
take scripted mock turns; e2e mock turns can target a model so a title
turn and a reply can't swap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jacensekai closed this pull request 2026-10-13 21:22:13 -04:00
Some checks failed
CI / Typecheck, build and test (pull_request) Successful in 19s
CI / End-to-end (Playwright) (pull_request) Successful in 58s
CI / Docker images and sandbox (pull_request) Failing after 11s
CI / Compose stack smoke test (pull_request) Failing after 6s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jacensekai/lumina!7
No description provided.