[PR #14005] [CLOSED] fix: prevent hidden models from being selected as default model #62212

Closed
opened 2026-05-06 06:12:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/14005
Author: @JimHeo
Created: 5/18/2025
Status: Closed

Base: devHead: fix/hidden_model


📝 Commits (1)

  • 758539e fix: 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:

  • Target branch: verify 'dev' branch
  • Description: see below
  • Changelog: see below
  • Documentation: n/a
  • Dependencies: none
  • Testing: yes
  • Code review: yes
  • Prefix:
    • fix: Bug fix or error correction

Changelog Entry

Description

  1. 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.

  2. 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.

  1. Expected behaviour
    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 of selectedModel with logic that skips hidden models and, if the current value points to a hidden or missing model, updates value (and selectedModel) to the first visible model or clears it when none are available.

Fixed

  • Prevented hidden models from remaining selected as the default when opening a new chat, so users will now fall back to the first non-hidden model.

Screenshots or Videos

Public Model: gpt-4.1, gpt-4.1-mini, gpt-4.1-nano
Hide Model: gpt-4.1-nano

Admin Panel
1

User Accessed View
2

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.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/14005 **Author:** [@JimHeo](https://github.com/JimHeo) **Created:** 5/18/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix/hidden_model` --- ### 📝 Commits (1) - [`758539e`](https://github.com/open-webui/open-webui/commit/758539efffb068eee11f876c93c8b1778c11693f) fix: hidden model is revealed in seleced model ### 📊 Changes **1 file changed** (+15 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/ModelSelector/Selector.svelte` (+15 -1) </details> ### 📄 Description # Pull Request Checklist ### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request. I opened [Discussions #14004](https://github.com/open-webui/open-webui/discussions/14004) to describe the issue and proposed solution. **Before submitting, make sure you've checked the following:** - [x] **Target branch:** verify 'dev' branch - [x] **Description:** see below - [x] **Changelog:** see below - [x] **Documentation:** n/a - [x] **Dependencies:** none - [x] **Testing:** yes - [x] **Code review:** yes - [x] **Prefix:** - **fix**: Bug fix or error correction # Changelog Entry ### Description 1. 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. 2. 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. 3. Expected behaviour 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 of `selectedModel` with logic that skips hidden models and, if the current value points to a hidden or missing model, updates `value` (and `selectedModel`) to the first visible model or clears it when none are available. ### Fixed - Prevented hidden models from remaining selected as the default when opening a new chat, so users will now fall back to the first non-hidden model. --- ### Screenshots or Videos Public Model: gpt-4.1, gpt-4.1-mini, gpt-4.1-nano Hide Model: gpt-4.1-nano Admin Panel <img width="1247" alt="1" src="https://github.com/user-attachments/assets/5b481359-28c4-429b-80de-1c492b514017" /> User Accessed View <img width="670" alt="2" src="https://github.com/user-attachments/assets/a5e2ab6d-0dc8-42ca-8584-11c8ce7742ff" /> ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <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-06 06:12:56 -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#62212