[GH-ISSUE #22329] issue: Query Generation not functional #106697

Closed
opened 2026-05-18 05:09:41 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @lbatalha on GitHub (Mar 6, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/22329

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.8.8

Ollama Version (if applicable)

No response

Operating System

Linux

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 the search_web tool is called, the search query used should be generated by the model defined in Admin Settings -> Interface -> Task Model

Actual Behavior

The Task Model is not called to generate the query, even though it is called to generate Titles/Tags/Followups (when enabled)

Steps to Reproduce

Setup:
Docker Compose:

services:
  openwebui:
    image: ghcr.io/open-webui/open-webui:main-slim
    container_name: openwebui
    restart: unless-stopped
    stop_grace_period: "120s"
    environment:
      - RAG_SYSTEM_CONTEXT=True
      - CORS_ALLOW_ORIGIN=https://mydomain;http://127.0.0.1:33808
      #- ENABLE_OTEL=True
      #- ENABLE_OTEL_METRICS=True
      - AIOHTTP_CLIENT_TIMEOUT=1600
    networks:
      - ml
    ports:
      - "127.0.0.1:33808:8080"
    volumes:
      - ./data:/app/backend/data
    cpu_shares: 1024
    mem_limit: '2G'

Using llama-proxy/llama.ccp as the backend model runners, configured in Configured in Admin Settings -> Connections as openapi endpoints

Model available in one of the backends chosen as both Local and External Task model:

Image

Retrieval and Web Search Query Generation Enabled in UI (have also tried enabling via env variables), prompts left at default, but have tested with a customized Query Generation Prompt:

Image

Title generation is functioning correctly -> Calls the listed model automatically and returns titles correctly. (Can see activity in llama and a OWUI log 2026-03-06 17:43:04.167 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.88.13:0 - "POST /api/v1/tasks/title/completions HTTP/1.1" 200)

When a model calls the search_web tool during a chat, the prompt used appears to be generated by the model itself (ie: small dumb models produce terrible queries, and large models produce good complete queries).

There is no activity seen on the selected Task Model and nothing in logs that indicates it was ever called.

I have tested with selecting various local models as the task model.

The models are set to Public and Local

Logs & Screenshots

Examples:

Image Image Image

Additional Information

There are no Web Console logs shown during prompting of the model (the model calls the search_web tool during this)

OWUI Container logs when triggering the question as per screenshots:

2026-03-06 18:09:14.198 | INFO     | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.88.13:0 - "POST /api/v1/chats/8496cf2c-ed99-46ea-8e76-20efe0aa66a3 HTTP/1.1" 200
2026-03-06 18:09:14.248 | INFO     | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.88.13:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200
2026-03-06 18:09:14.410 | INFO     | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.88.13:0 - "POST /api/chat/completions HTTP/1.1" 200
2026-03-06 18:09:14.466 | INFO     | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.88.13:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200
2026-03-06 18:09:16.609 | INFO     | ddgs.base:search:116 - response: https://en.wikipedia.org/w/api.php?action=opensearch&profile=fuzzy&limit=1&search=current%20month 200
2026-03-06 18:09:16.663 | INFO     | ddgs.base:search:116 - response: https://grokipedia.com/api/typeahead?query=current+month&limit=1 200
2026-03-06 18:09:16.765 | INFO     | ddgs.engines.wikipedia:extract_results:56 - response: https://en.wikipedia.org/w/api.php?action=query&format=json&prop=extracts&titles=Current%20Anthropology&explaintext=0&exintro=0&redirects=1 200
2026-03-06 18:09:16.942 | INFO     | ddgs.base:search:116 - response: https://www.mojeek.com/search?q=current+month 403
2026-03-06 18:09:17.358 | INFO     | ddgs.base:search:116 - response: https://search.yahoo.com/search;_ylt=JiLaIYuySv20Y7Ltkppbt3Os;_ylu=T03vkzoDN2vIVJCnxk_x4rIUm6_I03SlMcZBKfKcbQ6zd50?p=current+month 200
2026-03-06 18:09:18.391 | INFO     | ddgs.base:search:116 - response: https://yandex.com/search/site/?text=current+month&web=1&searchid=4305220 200

(The model search query was "current month" and no request was made to the task model outside of generating a Title)

Originally created by @lbatalha on GitHub (Mar 6, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/22329 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.8.8 ### Ollama Version (if applicable) _No response_ ### Operating System Linux ### 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 the `search_web` tool is called, the search query used should be generated by the model defined in Admin Settings -> Interface -> Task Model ### Actual Behavior The Task Model is not called to generate the query, even though it is called to generate Titles/Tags/Followups (when enabled) ### Steps to Reproduce Setup: Docker Compose: ``` services: openwebui: image: ghcr.io/open-webui/open-webui:main-slim container_name: openwebui restart: unless-stopped stop_grace_period: "120s" environment: - RAG_SYSTEM_CONTEXT=True - CORS_ALLOW_ORIGIN=https://mydomain;http://127.0.0.1:33808 #- ENABLE_OTEL=True #- ENABLE_OTEL_METRICS=True - AIOHTTP_CLIENT_TIMEOUT=1600 networks: - ml ports: - "127.0.0.1:33808:8080" volumes: - ./data:/app/backend/data cpu_shares: 1024 mem_limit: '2G' ``` Using `llama-proxy`/`llama.ccp` as the backend model runners, configured in Configured in Admin Settings -> Connections as openapi endpoints Model available in one of the backends chosen as both Local and External Task model: <img width="1087" height="125" alt="Image" src="https://github.com/user-attachments/assets/8183857d-ab83-472b-a244-0b638acca9c4" /> Retrieval and Web Search Query Generation Enabled in UI (have also tried enabling via env variables), prompts left at default, but have tested with a customized `Query Generation Prompt`: <img width="1649" height="684" alt="Image" src="https://github.com/user-attachments/assets/788986f6-bb46-4eb8-aa37-afb453340fce" /> Title generation is functioning correctly -> Calls the listed model automatically and returns titles correctly. (Can see activity in llama and a OWUI log `2026-03-06 17:43:04.167 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.88.13:0 - "POST /api/v1/tasks/title/completions HTTP/1.1" 200`) When a model calls the `search_web` tool during a chat, the prompt used appears to be generated by the model itself (ie: small dumb models produce terrible queries, and large models produce good complete queries). There is no activity seen on the selected Task Model and nothing in logs that indicates it was ever called. I have tested with selecting various local models as the task model. The models are set to `Public` and `Local` ### Logs & Screenshots Examples: <img width="1271" height="348" alt="Image" src="https://github.com/user-attachments/assets/afd1a2bb-a10a-462d-b9bc-b50ab5eb1787" /> <img width="1259" height="383" alt="Image" src="https://github.com/user-attachments/assets/20f48dfe-1579-4906-ad76-9c934164a9ed" /> <img width="1278" height="402" alt="Image" src="https://github.com/user-attachments/assets/703f1ea3-2476-446a-9f67-f537dfd252fa" /> ### Additional Information There are no Web Console logs shown during prompting of the model (the model calls the `search_web` tool during this) OWUI Container logs when triggering the question as per screenshots: ``` 2026-03-06 18:09:14.198 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.88.13:0 - "POST /api/v1/chats/8496cf2c-ed99-46ea-8e76-20efe0aa66a3 HTTP/1.1" 200 2026-03-06 18:09:14.248 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.88.13:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 2026-03-06 18:09:14.410 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.88.13:0 - "POST /api/chat/completions HTTP/1.1" 200 2026-03-06 18:09:14.466 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.88.13:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 2026-03-06 18:09:16.609 | INFO | ddgs.base:search:116 - response: https://en.wikipedia.org/w/api.php?action=opensearch&profile=fuzzy&limit=1&search=current%20month 200 2026-03-06 18:09:16.663 | INFO | ddgs.base:search:116 - response: https://grokipedia.com/api/typeahead?query=current+month&limit=1 200 2026-03-06 18:09:16.765 | INFO | ddgs.engines.wikipedia:extract_results:56 - response: https://en.wikipedia.org/w/api.php?action=query&format=json&prop=extracts&titles=Current%20Anthropology&explaintext=0&exintro=0&redirects=1 200 2026-03-06 18:09:16.942 | INFO | ddgs.base:search:116 - response: https://www.mojeek.com/search?q=current+month 403 2026-03-06 18:09:17.358 | INFO | ddgs.base:search:116 - response: https://search.yahoo.com/search;_ylt=JiLaIYuySv20Y7Ltkppbt3Os;_ylu=T03vkzoDN2vIVJCnxk_x4rIUm6_I03SlMcZBKfKcbQ6zd50?p=current+month 200 2026-03-06 18:09:18.391 | INFO | ddgs.base:search:116 - response: https://yandex.com/search/site/?text=current+month&web=1&searchid=4305220 200 ``` (The model search query was "current month" and no request was made to the task model outside of generating a Title)
GiteaMirror added the bug label 2026-05-18 05:09:41 -05:00
Author
Owner

@Classic298 commented on GitHub (Mar 6, 2026):

Expected Behavior
When the search_web tool is called, the search query used should be generated by the model defined in Admin Settings -> Interface -> Task Model

"Expected behaviour" here is inaccurate - when native tool calling is used, then the model in the chat calls the tool. By calling the tool, the model in the chat also has to provide the parameters for the tool (incl. the search query)

the task model should not do it in native tool calling mode. the task model is not used for tool calling in native tool calling mode.

<!-- gh-comment-id:4013245801 --> @Classic298 commented on GitHub (Mar 6, 2026): > Expected Behavior > When the search_web tool is called, the search query used should be generated by the model defined in Admin Settings -> Interface -> Task Model "Expected behaviour" here is inaccurate - when native tool calling is used, then the model in the chat calls the tool. By calling the tool, the model in the chat also has to provide the parameters for the tool (incl. the search query) the task model should not do it in native tool calling mode. the task model is not used for tool calling in native tool calling mode.
Author
Owner

@lbatalha commented on GitHub (Mar 6, 2026):

Thank you for the clarification!
I did a lot of searching the docs and old issues/discussions, but it wasn't obvious to me that this was the expected behavior. Maybe adding a notice box to https://docs.openwebui.com/features/chat-conversations/web-search/agentic-search noting this would make it clear that it is intended?

<!-- gh-comment-id:4013479683 --> @lbatalha commented on GitHub (Mar 6, 2026): Thank you for the clarification! I did a lot of searching the docs and old issues/discussions, but it wasn't obvious to me that this was the expected behavior. Maybe adding a notice box to https://docs.openwebui.com/features/chat-conversations/web-search/agentic-search noting this would make it clear that it is intended?
Author
Owner

@Classic298 commented on GitHub (Mar 6, 2026):

more information can be found here: https://docs.openwebui.com/features/extensibility/plugin/tools/#tool-calling-modes-default-vs-native

<!-- gh-comment-id:4013490431 --> @Classic298 commented on GitHub (Mar 6, 2026): more information can be found here: https://docs.openwebui.com/features/extensibility/plugin/tools/#tool-calling-modes-default-vs-native
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#106697