[PR #12806] [MERGED] fix: Resolve small bugs on updated web/rag settings #38649

Closed
opened 2026-04-25 11:34:17 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/12806
Author: @tth37
Created: 4/13/2025
Status: Merged
Merged: 4/13/2025
Merged by: @tjbck

Base: devHead: fix_web_rag_settings


📝 Commits (2)

📊 Changes

2 files changed (+15 additions, -7 deletions)

View changed files

📝 backend/open_webui/routers/retrieval.py (+3 -3)
📝 src/lib/components/admin/Settings/WebSearch.svelte (+12 -4)

📄 Description

This PR addresses minor issues identified after recent updates to the web search / rag configuration settings.

Backend (routers/retrieval.py):

  1. Renamed form_data.enable_google_drive_integration to form_data.ENABLE_GOOGLE_DRIVE_INTEGRATION.
    • The corresponding field in ConfigForm was updated to uppercase, but the retrieval router was still using the lowercase version. (Potential 500 error)
  2. Updated write operation from request.app.state.config.YOUTUBE_LOADER_TRANSLATION to request.app.state.YOUTUBE_LOADER_TRANSLATION.
    • This specific configuration value appears to be managed directly on the app.state object rather than within the nested config attribute. (Potential 500 error)

Frontend (WebSearch.svelte):

  1. Removed the required attribute from the web loader selector input.
    • With required, users could not submit the form if the default value ("safe_web") was intended.
  2. Convert webConfig.YOUTUBE_LOADER_LANGUAGE to a list data type before submitting the form update.
    • The backend API endpoint expects this configuration value to be a list[str], similar to domain filter list. (Potential 4xx error)
  3. (I suggest) Modified the display join logic from webConfig.WEB_SEARCH_DOMAIN_FILTER_LIST.join(', ') to .join(',').
    • Aligns with the format shown in the input's placeholder text (no space after comma).
    • When user triggers the config update, the handler processes it into a list, and upon data binding, the Svelte component would likely display it without the space; After that if extra space is introduced, it will make the format change unexpectedly for the user post-submission.

🔄 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/12806 **Author:** [@tth37](https://github.com/tth37) **Created:** 4/13/2025 **Status:** ✅ Merged **Merged:** 4/13/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `fix_web_rag_settings` --- ### 📝 Commits (2) - [`8d53f1e`](https://github.com/open-webui/open-webui/commit/8d53f1e7709868a8a69e1f65d9b1a8232a66fdc0) fix: small bugs on updated web/rag settings - [`db9d4ea`](https://github.com/open-webui/open-webui/commit/db9d4ead590d94d0569d075787441a4bdfab6cd8) format ### 📊 Changes **2 files changed** (+15 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/routers/retrieval.py` (+3 -3) 📝 `src/lib/components/admin/Settings/WebSearch.svelte` (+12 -4) </details> ### 📄 Description This PR addresses minor issues identified after recent updates to the web search / rag configuration settings. **Backend (`routers/retrieval.py`):** 1. Renamed `form_data.enable_google_drive_integration` to `form_data.ENABLE_GOOGLE_DRIVE_INTEGRATION`. - The corresponding field in `ConfigForm` was updated to uppercase, but the retrieval router was still using the lowercase version. (Potential 500 error) 2. Updated write operation from `request.app.state.config.YOUTUBE_LOADER_TRANSLATION` to `request.app.state.YOUTUBE_LOADER_TRANSLATION`. - This specific configuration value appears to be managed directly on the `app.state` object rather than within the nested `config` attribute. (Potential 500 error) **Frontend (`WebSearch.svelte`):** 1. Removed the `required` attribute from the web loader selector input. - With `required`, users could not submit the form if the default value ("safe_web") was intended. 2. Convert `webConfig.YOUTUBE_LOADER_LANGUAGE` to a list data type before submitting the form update. - The backend API endpoint expects this configuration value to be a `list[str]`, similar to domain filter list. (Potential 4xx error) 3. (I suggest) Modified the display join logic from `webConfig.WEB_SEARCH_DOMAIN_FILTER_LIST.join(', ')` to `.join(',')`. - Aligns with the format shown in the input's placeholder text (no space after comma). - When user triggers the config update, the handler processes it into a list, and upon data binding, the Svelte component would likely display it *without* the space; After that if extra space is introduced, it will make the format change unexpectedly for the user post-submission. --- <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-04-25 11:34:17 -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#38649