[PR #18750] [CLOSED] feat: Admin model pinning #11701

Closed
opened 2025-11-11 19:39:01 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/18750
Author: @Classic298
Created: 10/31/2025
Status: Closed

Base: devHead: admin-model-pinning


📝 Commits (10+)

  • 3a67a21 Update configs.py
  • 62be87d Update ConfigureModelsModal.svelte
  • 73dc4e7 Update ConfigureModelsModal.svelte
  • 0a40797 Update ConfigureModelsModal.svelte
  • e8c90a3 Update ConfigureModelsModal.svelte
  • 6988f26 Update PinnedModelList.svelte
  • e30b9bd Update ModelSelector.svelte
  • 1f201c8 Update PinnedModelList.svelte
  • 0a67d6b Update ConfigureModelsModal.svelte
  • ebf2a20 added config var, and moved model_order_list to the other related env vars.

📊 Changes

7 files changed (+148 additions, -27 deletions)

View changed files

📝 backend/open_webui/config.py (+10 -6)
📝 backend/open_webui/main.py (+4 -1)
📝 backend/open_webui/routers/configs.py (+4 -0)
📝 src/lib/components/admin/Settings/Models/ConfigureModelsModal.svelte (+82 -0)
📝 src/lib/components/chat/ModelSelector.svelte (+1 -1)
📝 src/lib/components/layout/Sidebar.svelte (+10 -14)
📝 src/lib/components/layout/Sidebar/PinnedModelList.svelte (+37 -5)

📄 Description

Pull Request Checklist

Before submitting, make sure you've checked the following:

  • Target branch: Verify that the pull request targets the dev branch. Not targeting the dev branch may lead to immediate closure of the PR.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: If necessary, update relevant documentation Open WebUI Docs like environment variables, the tutorials, or other documentation sources.
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Perform manual tests to verify the implemented fix/feature works as intended AND does not break any other functionality. Take this as an opportunity to make screenshots of the feature/fix and include it in the PR description.
  • Agentic AI Code:: Confirm this Pull Request is not written by any AI Agent or has at least gone through additional human review and manual testing. If any AI Agent is the co-author of this PR, it may lead to immediate closure of the PR.
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Title Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
    • feat: Introduces a new feature or enhancement to the codebase

Changelog Entry

Description

Adds an admin configuration option to set default pinned models for all users, following the exact same behavior pattern as the existing "default models" setting. Admins can now define which models should be pinned to the sidebar by default, improving the out-of-box experience for new users while preserving user autonomy.

Pattern Matching: This feature precisely mirrors the existing default models behavior:

  • Admins set defaults via Admin Settings > Models > Settings modal
  • New users automatically inherit admin-configured defaults
  • Once a user customizes their pinned models (pin, unpin, or reorder), the pinnedModelsCustomized flag is set
  • Users with the customization flag are never affected by future admin changes to defaults
  • Users maintain full control and can override admin defaults at any time

User-Friendly Behavior:

  1. Non-intrusive: Defaults only apply to users who haven't customized their pinned models
  2. Reversible: Users can immediately customize by pinning/unpinning any model
  3. Transparent: Behaves identically to the well-established default models feature
  4. Flexible: Admins can set multiple pinned models in a specific order

Existing Installations:

  1. Fully backward compatible - no breaking changes
  2. Existing user pinned models remain unchanged (implicitly have pinnedModelsCustomized: true)
  3. Users with no pinned models will see admin defaults on next session
  4. If no admin defaults are configured, current behavior is unchanged

Screenshots or Videos

  • [Attach any relevant screenshots or videos demonstrating the changes]

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/18750 **Author:** [@Classic298](https://github.com/Classic298) **Created:** 10/31/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `admin-model-pinning` --- ### 📝 Commits (10+) - [`3a67a21`](https://github.com/open-webui/open-webui/commit/3a67a214c057cd895e1b024cb3b36c92ec287414) Update configs.py - [`62be87d`](https://github.com/open-webui/open-webui/commit/62be87d57a4434c9b4391ecc37711531fb363491) Update ConfigureModelsModal.svelte - [`73dc4e7`](https://github.com/open-webui/open-webui/commit/73dc4e74a087ab155e7af3164a582c7c8914b6d9) Update ConfigureModelsModal.svelte - [`0a40797`](https://github.com/open-webui/open-webui/commit/0a4079729ada836ab97d5028885ff6515ee1aebd) Update ConfigureModelsModal.svelte - [`e8c90a3`](https://github.com/open-webui/open-webui/commit/e8c90a3bf618f0b024a016596ba137778701f635) Update ConfigureModelsModal.svelte - [`6988f26`](https://github.com/open-webui/open-webui/commit/6988f26352ff13125622833c97aa596c66076f66) Update PinnedModelList.svelte - [`e30b9bd`](https://github.com/open-webui/open-webui/commit/e30b9bd4f6c0ab6a1c2d890b00d53d361e27d111) Update ModelSelector.svelte - [`1f201c8`](https://github.com/open-webui/open-webui/commit/1f201c886905eb3efde990e027f21cae7e665285) Update PinnedModelList.svelte - [`0a67d6b`](https://github.com/open-webui/open-webui/commit/0a67d6bd2a6c732de90f986e720c5589175c96d2) Update ConfigureModelsModal.svelte - [`ebf2a20`](https://github.com/open-webui/open-webui/commit/ebf2a209be9c2542d7cd225f8b1de7dafa3e4a0f) added config var, and moved model_order_list to the other related env vars. ### 📊 Changes **7 files changed** (+148 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+10 -6) 📝 `backend/open_webui/main.py` (+4 -1) 📝 `backend/open_webui/routers/configs.py` (+4 -0) 📝 `src/lib/components/admin/Settings/Models/ConfigureModelsModal.svelte` (+82 -0) 📝 `src/lib/components/chat/ModelSelector.svelte` (+1 -1) 📝 `src/lib/components/layout/Sidebar.svelte` (+10 -14) 📝 `src/lib/components/layout/Sidebar/PinnedModelList.svelte` (+37 -5) </details> ### 📄 Description # Pull Request Checklist **Before submitting, make sure you've checked the following:** - [X] **Target branch:** Verify that the pull request targets the `dev` branch. Not targeting the `dev` branch may lead to immediate closure of the PR. - [X] **Description:** Provide a concise description of the changes made in this pull request. - [X] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [X] **Documentation:** If necessary, update relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs) like environment variables, the tutorials, or other documentation sources. - [X] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [X] **Testing:** Perform manual tests to verify the implemented fix/feature works as intended AND does not break any other functionality. Take this as an opportunity to make screenshots of the feature/fix and include it in the PR description. - [X] **Agentic AI Code:**: Confirm this Pull Request is **not written by any AI Agent** or has at least gone through additional human review **and** manual testing. If any AI Agent is the co-author of this PR, it may lead to immediate closure of the PR. - [X] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [X] **Title Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following: - **feat**: Introduces a new feature or enhancement to the codebase # Changelog Entry ### Description Adds an admin configuration option to set default pinned models for all users, following the exact same behavior pattern as the existing "default models" setting. Admins can now define which models should be pinned to the sidebar by default, improving the out-of-box experience for new users while preserving user autonomy. **Pattern Matching: This feature precisely mirrors the existing default models behavior:** - Admins set defaults via Admin Settings > Models > Settings modal - New users automatically inherit admin-configured defaults - Once a user customizes their pinned models (pin, unpin, or reorder), the pinnedModelsCustomized flag is set - Users with the customization flag are never affected by future admin changes to defaults - Users maintain full control and can override admin defaults at any time **User-Friendly Behavior:** 1. Non-intrusive: Defaults only apply to users who haven't customized their pinned models 2. Reversible: Users can immediately customize by pinning/unpinning any model 3. Transparent: Behaves identically to the well-established default models feature 4. Flexible: Admins can set multiple pinned models in a specific order **Existing Installations:** 1. Fully backward compatible - no breaking changes 2. Existing user pinned models remain unchanged (implicitly have pinnedModelsCustomized: true) 3. Users with no pinned models will see admin defaults on next session 4. If no admin defaults are configured, current behavior is unchanged ### Screenshots or Videos - [Attach any relevant screenshots or videos demonstrating the changes] ### 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. --- <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 2025-11-11 19:39:01 -06: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#11701