[PR #20418] [CLOSED] fix: default model not populating for standard users (#18450) #64473

Closed
opened 2026-05-06 10:05:14 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/20418
Author: @Classic298
Created: 1/6/2026
Status: Closed

Base: devHead: fix-18450


📝 Commits (1)

  • aff2c1d fix: default model not populating for standard users (#18450)

📊 Changes

4 files changed (+16 additions, -8 deletions)

View changed files

📝 src/lib/components/chat/Chat.svelte (+4 -2)
📝 src/lib/components/notes/NoteEditor.svelte (+4 -2)
📝 src/lib/components/playground/Chat.svelte (+4 -2)
📝 src/lib/components/playground/Completions.svelte (+4 -2)

📄 Description

fix: default model not populating for standard users (#18450)

The admin's default model setting was not being applied to standard users when opening or refreshing the chat page. This occurred because the check for user-configured models used a truthy check on the models array, which evaluates to true even for empty arrays.

When a user's saved model was removed or access was revoked, their settings would contain an empty models array. This empty array satisfied the truthy condition, preventing the fallback to the admin-configured default models.

Changed the condition to explicitly verify the user has at least one valid, non-empty model ID before using their settings. If not, the admin default models are now correctly applied as intended.

Affected components: Chat, NoteEditor, Playground Chat, Playground Completions

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.

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/20418 **Author:** [@Classic298](https://github.com/Classic298) **Created:** 1/6/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix-18450` --- ### 📝 Commits (1) - [`aff2c1d`](https://github.com/open-webui/open-webui/commit/aff2c1df4a6a619ff2b50c9f98b1f93c874b36e0) fix: default model not populating for standard users (#18450) ### 📊 Changes **4 files changed** (+16 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/Chat.svelte` (+4 -2) 📝 `src/lib/components/notes/NoteEditor.svelte` (+4 -2) 📝 `src/lib/components/playground/Chat.svelte` (+4 -2) 📝 `src/lib/components/playground/Completions.svelte` (+4 -2) </details> ### 📄 Description fix: default model not populating for standard users (#18450) The admin's default model setting was not being applied to standard users when opening or refreshing the chat page. This occurred because the check for user-configured models used a truthy check on the models array, which evaluates to true even for empty arrays. When a user's saved model was removed or access was revoked, their settings would contain an empty models array. This empty array satisfied the truthy condition, preventing the fallback to the admin-configured default models. Changed the condition to explicitly verify the user has at least one valid, non-empty model ID before using their settings. If not, the admin default models are now correctly applied as intended. Affected components: Chat, NoteEditor, Playground Chat, Playground Completions ### Contributor License Agreement 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-06 10:05:14 -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#64473