[GH-ISSUE #14746] issue: Bypass Web Loader in Web Search not working #32880

Closed
opened 2026-04-25 06:44:14 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @williamgateszhao on GitHub (Jun 7, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14746

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.13

Ollama Version (if applicable)

No response

Operating System

Alpine Linux 6.12.22

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

When enabling Bypass Web Loader in admin/settings - Web Search, the web search should work normally.

Actual Behavior

After enabling Bypass Web Loader, the web search consistently returns empty results.

Steps to Reproduce

  1. Navigate to admin/settings - Web Search.
  2. Enable "Bypass Web Loader".
  3. Note: Other settings on this page (e.g., "Bypass Embedding and Retrieval", "Web Search Engine", "Web Loader Engine") do not affect reproducibility regardless of adjustments.

Logs & Screenshots

No need to provide the log as the issue has already been identified.

Additional Information

This bug was introduced by commit 2eca6f6, which was inspired by my PR #11655 and @Youggls' PR #12845.

Previously, in backend/open_webui/routers/retrieval.py, the web_results in the process_web_search function was a flat list. Thus, when request.app.state.config.BYPASS_WEB_SEARCH_WEB_LOADER was True, the logic for result in search_results with page_content=result.snippet worked correctly.

However, in the current implementation, web_results in process_web_search is now a nested list (see line 1814). To access result.snippet, the list must first be flattened into a 1D array. The fix would be:

if request.app.state.config.BYPASS_WEB_SEARCH_WEB_LOADER:
    # fix
    all_search_items = [item for sublist in search_results for item in sublist if sublist]
    
    docs = [
        Document(
            page_content=result.snippet,
            metadata={
                "source": result.link,
                "title": result.title,
                "snippet": result.snippet,
                "link": result.link,
            },
        )
        # fix
        for result in all_search_items 
        if hasattr(result, "snippet")
    ]

Would you like me to submit a PR to implement this fix?

Originally created by @williamgateszhao on GitHub (Jun 7, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/14746 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.13 ### Ollama Version (if applicable) _No response_ ### Operating System Alpine Linux 6.12.22 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior When enabling `Bypass Web Loader` in admin/settings - Web Search, the web search should work normally. ### Actual Behavior After enabling `Bypass Web Loader`, the web search consistently returns empty results. ### Steps to Reproduce 1. Navigate to admin/settings - Web Search. 2. Enable "Bypass Web Loader". 3. Note: Other settings on this page (e.g., "Bypass Embedding and Retrieval", "Web Search Engine", "Web Loader Engine") do not affect reproducibility regardless of adjustments. ### Logs & Screenshots No need to provide the log as the issue has already been identified. ### Additional Information This bug was introduced by commit 2eca6f6, which was inspired by my PR #11655 and @Youggls' PR #12845. Previously, in backend/open_webui/routers/retrieval.py, the `web_results` in the `process_web_search` function was a flat list. Thus, when `request.app.state.config.BYPASS_WEB_SEARCH_WEB_LOADER` was True, the logic `for result in search_results` with `page_content=result.snippet` worked correctly. However, in the current implementation, `web_results` in `process_web_search` is now a nested list (see line 1814). To access result.snippet, the list must first be flattened into a 1D array. The fix would be: ```python if request.app.state.config.BYPASS_WEB_SEARCH_WEB_LOADER: # fix all_search_items = [item for sublist in search_results for item in sublist if sublist] docs = [ Document( page_content=result.snippet, metadata={ "source": result.link, "title": result.title, "snippet": result.snippet, "link": result.link, }, ) # fix for result in all_search_items if hasattr(result, "snippet") ] ``` Would you like me to submit a PR to implement this fix?
GiteaMirror added the bug label 2026-04-25 06:44:14 -05:00
Author
Owner

@PSL3D commented on GitHub (Jun 7, 2025):

I can confirm I am experiencing the exact same issue on the latest version with Docker Compose. docker inspect shows the SEARXNG_QUERY_URL environment variable is correctly set, but the application logs state that it is not found. Inter-container networking is confirmed working via curl.

<!-- gh-comment-id:2952301844 --> @PSL3D commented on GitHub (Jun 7, 2025): I can confirm I am experiencing the exact same issue on the latest version with Docker Compose. docker inspect shows the SEARXNG_QUERY_URL environment variable is correctly set, but the application logs state that it is not found. Inter-container networking is confirmed working via curl.
Author
Owner

@tjbck commented on GitHub (Jun 16, 2025):

Fixed with f3cae94028bd494cae7a29e62fad2ea55f910d89!

<!-- gh-comment-id:2976437011 --> @tjbck commented on GitHub (Jun 16, 2025): Fixed with f3cae94028bd494cae7a29e62fad2ea55f910d89!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#32880