mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[PR #14005] [CLOSED] fix: prevent hidden models from being selected as default model #62212
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/14005
Author: @JimHeo
Created: 5/18/2025
Status: ❌ Closed
Base:
dev← Head:fix/hidden_model📝 Commits (1)
758539efix: hidden model is revealed in seleced model📊 Changes
1 file changed (+15 additions, -1 deletions)
View changed files
📝
src/lib/components/chat/ModelSelector/Selector.svelte(+15 -1)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
I opened Discussions #14004 to describe the issue and proposed solution.
Before submitting, make sure you've checked the following:
Changelog Entry
Description
Problem
When a model is marked Hide Model in Admin Panel, it disappears from the picker but is still auto-selected as the default when starting a new chat.
Steps to reproduce
Go to Admin Panel → Settings → Models.
Select Model A and Click "more" button and the "Hide Model" button to toggle.
Click “New Chat” → Model A appears as the selected model.
A hidden model should not be chosen as the default. The first visible model (or a user-defined default) should be used instead.
Note: The model should still be available for title-generation and tag-generation tasks under user permissions, but modifications are required to prevent users from initiating direct chat with it.
Changed
src/lib/components/chat/ModelSelector/Selector.svelte: replaced the simple reactive assignment ofselectedModelwith logic that skips hidden models and, if the current value points to a hidden or missing model, updatesvalue(andselectedModel) to the first visible model or clears it when none are available.Fixed
Screenshots or Videos
Public Model: gpt-4.1, gpt-4.1-mini, gpt-4.1-nano
Hide Model: gpt-4.1-nano
Admin Panel

User Accessed View

Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.