[PR #24796] fix: use current dropdown model for sidebar title regeneration (#24745) #115160

Open
opened 2026-05-18 16:06:48 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/24796
Author: @Classic298
Created: 5/15/2026
Status: 🔄 Open

Base: devHead: fix/title-model-dropdown-24745


📝 Commits (1)

  • 5f01c25 fix: use current dropdown model for sidebar title regeneration (#24745)

📊 Changes

3 files changed (+30 additions, -9 deletions)

View changed files

📝 src/lib/components/chat/Chat.svelte (+6 -1)
📝 src/lib/components/layout/Sidebar/ChatItem.svelte (+19 -8)
📝 src/lib/stores/index.ts (+5 -0)

📄 Description

When the title task model is "Current Model", regenerating a title from the sidebar (Rename -> sparkles) used a model derived from the chat's message history instead of the model currently selected in the dropdown.

generateTitleHandler reused a cached chat, so repeated regenerations resolved the model from a stale history.currentId (the model from an old revision). Even with fresh data it never consulted the live dropdown selection, which the sidebar had no access to.

Add a selectedChatModels store mirrored from Chat.svelte; the handler now always refetches and, for the open chat, prefers the live selection. The history walk remains the fallback for chats that aren't open.

Contributor License Agreement

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/24796 **Author:** [@Classic298](https://github.com/Classic298) **Created:** 5/15/2026 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `fix/title-model-dropdown-24745` --- ### 📝 Commits (1) - [`5f01c25`](https://github.com/open-webui/open-webui/commit/5f01c25011c64ac00dd2f59873ac7d692573db5b) fix: use current dropdown model for sidebar title regeneration (#24745) ### 📊 Changes **3 files changed** (+30 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/Chat.svelte` (+6 -1) 📝 `src/lib/components/layout/Sidebar/ChatItem.svelte` (+19 -8) 📝 `src/lib/stores/index.ts` (+5 -0) </details> ### 📄 Description When the title task model is "Current Model", regenerating a title from the sidebar (Rename -> sparkles) used a model derived from the chat's message history instead of the model currently selected in the dropdown. generateTitleHandler reused a cached `chat`, so repeated regenerations resolved the model from a stale history.currentId (the model from an old revision). Even with fresh data it never consulted the live dropdown selection, which the sidebar had no access to. Add a selectedChatModels store mirrored from Chat.svelte; the handler now always refetches and, for the open chat, prefers the live selection. The history walk remains the fallback for chats that aren't open. ### Contributor License Agreement <!-- 🚨 DO NOT DELETE THE TEXT BELOW 🚨 Keep the "Contributor License Agreement" confirmation text intact. Deleting it will trigger the CLA-Bot to INVALIDATE your PR. Your PR will NOT be reviewed or merged until you check the box below confirming that you have read and agree to the terms of the CLA. --> - [x] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-18 16:06:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#115160