mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[PR #22972] [CLOSED] fix(ui): use default model for new chat instead of inheriting current model #42582
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22972
Author: @BillionClaw
Created: 3/24/2026
Status: ❌ Closed
Base:
main← Head:fix/new-chat-use-default-model📝 Commits (1)
5ff9558fix(ui): use default model for new chat instead of inheriting current model📊 Changes
1 file changed (+5 additions, -3 deletions)
View changed files
📝
src/lib/components/chat/Chat.svelte(+5 -3)📄 Description
Description
When clicking 'New Chat' while viewing an active chat with a non-default model, the new chat incorrectly inherits the current model instead of using the configured default model.
Root Cause
The model selector persists the selected model in the URL search params (?models=...). When navigating to a new chat via 'New Chat', the URL is not cleared of these model search params, causing the Chat component's init() to read the stale model from the URL instead of using the configured default.
Fix
Clear the 'models' and 'model' URL search params when resetting state for a new chat, ensuring the configured default model is always used.
Steps to Reproduce (before fix)
Steps to Verify (after fix)
Fixes #22957
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.