[GH-ISSUE #21120] issue: Built in Tools ignore Model configuration and access ALL Knowledge Bases #139115

Closed
opened 2026-05-25 12:24:44 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @Blenderpics on GitHub (Feb 3, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21120

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.7.2 (digest: sha256:000b87a6ae726aa7f6611a0064ba528ba1a6aff6ead5fb3b6c89fd4a5717eb8a)

Ollama Version (if applicable)

No response

Operating System

Ubuntu 24.04

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

Models respect their assigned Knowledgebases, even if Tool Calling = native and Built in Tools = true.
Only Knowledgebases that are assigned to the model can be queried by the build in tools.

Actual Behavior

The Model ignores its configuration and searches every Knowledge Base reachable by the user account, returning data it should not have access to.

Image Image

Steps to Reproduce

  1. Setup Data: Create a Knowledge Base (let's call it "KB_Restricted") containing specific information (e.g., a unique phrase like "Project Alpha Secret Code 123").
  2. Configure Agent: Create a new Model/Agent settings:
    • Knowledge: Ensure NO Knowledge Bases are selected/attached (or attach a completely unrelated different KB).
    • Capabilities: Enable "Built-in Tools".
    • Tool Calling: Ensure the model supports native tool calling.
  3. Permissions: Log in as a user who has access to "KB_Restricted" (via the workspace or specific permissions).
  4. Execute: Open a chat with the new Agent and ask: "What is the Project Alpha Secret Code?"
  5. Observation: The Agent utilizes the built-in tool (e.g., search_knowledge_files) and correctly returns "123", proving it accessed "KB_Restricted" despite it not being configured for this Agent.

Logs & Screenshots

When "Built-in Tools" is activated for a model, the model gains the ability to query Knowledge Bases. However, the scope of this query is incorrectly set to ALL Knowledge Bases the current user has access to, completely ignoring the specific Knowledge Bases configured (attached) to that model.

We have several models. Some use public hosted LLMs, some use self hosted LLMs.
The public LLMs must not have access to internal company data.
Therefore only the self hosted models use knowledge bases that contain sensitive data.
Due to this bug, even the public models gained access to the knowledge bases they where not supposed to.

This is quite a big deal!

Additional Information

No response

Originally created by @Blenderpics on GitHub (Feb 3, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/21120 ### 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.7.2 (digest: sha256:000b87a6ae726aa7f6611a0064ba528ba1a6aff6ead5fb3b6c89fd4a5717eb8a) ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 24.04 ### 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 Models respect their assigned Knowledgebases, even if Tool Calling = native and Built in Tools = true. Only Knowledgebases that are assigned to the model can be queried by the build in tools. ### Actual Behavior The Model ignores its configuration and searches every Knowledge Base reachable by the user account, returning data it should not have access to. <img width="1079" height="484" alt="Image" src="https://github.com/user-attachments/assets/3a55a7ac-d105-4436-bc6b-e5a8b3b9fe84" /> <img width="1316" height="964" alt="Image" src="https://github.com/user-attachments/assets/f2064303-a692-412e-bc0a-3a12930c9603" /> ### Steps to Reproduce 1. Setup Data: Create a Knowledge Base (let's call it "KB_Restricted") containing specific information (e.g., a unique phrase like "Project Alpha Secret Code 123"). 2. Configure Agent: Create a new Model/Agent settings: * Knowledge: Ensure NO Knowledge Bases are selected/attached (or attach a completely unrelated different KB). * Capabilities: Enable "Built-in Tools". * Tool Calling: Ensure the model supports native tool calling. 3. Permissions: Log in as a user who has access to "KB_Restricted" (via the workspace or specific permissions). 4. Execute: Open a chat with the new Agent and ask: "What is the Project Alpha Secret Code?" 5. Observation: The Agent utilizes the built-in tool (e.g., `search_knowledge_files`) and correctly returns "123", proving it accessed "KB_Restricted" despite it not being configured for this Agent. ### Logs & Screenshots When "Built-in Tools" is activated for a model, the model gains the ability to query Knowledge Bases. However, the scope of this query is incorrectly set to ALL Knowledge Bases the current user has access to, completely ignoring the specific Knowledge Bases configured (attached) to that model. We have several models. Some use public hosted LLMs, some use self hosted LLMs. The public LLMs must not have access to internal company data. Therefore only the self hosted models use knowledge bases that contain sensitive data. Due to this bug, even the public models gained access to the knowledge bases they where not supposed to. This is quite a big deal! ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-25 12:24:45 -05:00
Author
Owner

@owui-terminator[bot] commented on GitHub (Feb 3, 2026):

🔍 Similar Issues Found

I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:

  1. #20703 issue: Some Knowledge Bases dont work(?)
    by Nels2 • Jan 15, 2026 • bug

  2. #20568 issue: Custom model did not configure Knowledge but still defaults to calling function
    by ChGoh7 • Jan 11, 2026 • bug

  3. #20851 issue: view_knowledge_file builtin tool not injected in Native mode (Builtin Tools enabled)
    by jaza089 • Jan 21, 2026 • bug

  4. #20676 issue: Cloud models fail to use native tools
    by 0x7CFE • Jan 15, 2026 • bug

  5. #20549 issue: Native tools are injected when models are used over the openwebui API.
    by LysanderdeJong • Jan 10, 2026 • bug

Show 2 more related issues
  1. #17514 issue: Workspace Models: Knowledge being ignored when created in older Open WebUI version
    by lindner-tj • Sep 17, 2025 • bug

  2. #20641 issue: Web Search and Builtin Tools permissions break search
    by HenkieTenkie62 • Jan 13, 2026 • bug


💡 Tips:

  • If this is a duplicate, please consider closing this issue and adding any additional details to the existing one
  • If you found a solution in any of these issues, please share it here to help others

This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.

<!-- gh-comment-id:3840242571 --> @owui-terminator[bot] commented on GitHub (Feb 3, 2026): 🔍 **Similar Issues Found** I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions: 1. [#20703](https://github.com/open-webui/open-webui/issues/20703) **issue: Some Knowledge Bases dont work(?)** *by Nels2 • Jan 15, 2026 • `bug`* 2. [#20568](https://github.com/open-webui/open-webui/issues/20568) **issue: Custom model did not configure Knowledge but still defaults to calling function** *by ChGoh7 • Jan 11, 2026 • `bug`* 3. [#20851](https://github.com/open-webui/open-webui/issues/20851) **issue: view_knowledge_file builtin tool not injected in Native mode (Builtin Tools enabled)** *by jaza089 • Jan 21, 2026 • `bug`* 4. [#20676](https://github.com/open-webui/open-webui/issues/20676) **issue: Cloud models fail to use native tools** *by 0x7CFE • Jan 15, 2026 • `bug`* 5. [#20549](https://github.com/open-webui/open-webui/issues/20549) **issue: Native tools are injected when models are used over the openwebui API.** *by LysanderdeJong • Jan 10, 2026 • `bug`* <details> <summary>Show 2 more related issues</summary> 6. [#17514](https://github.com/open-webui/open-webui/issues/17514) **issue: Workspace Models: Knowledge being ignored when created in older Open WebUI version** *by lindner-tj • Sep 17, 2025 • `bug`* 7. [#20641](https://github.com/open-webui/open-webui/issues/20641) **issue: Web Search and Builtin Tools permissions break search** *by HenkieTenkie62 • Jan 13, 2026 • `bug`* </details> --- 💡 **Tips:** - If this is a duplicate, please consider closing this issue and adding any additional details to the existing one - If you found a solution in any of these issues, please share it here to help others *This comment was generated automatically by a bot.* Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
Author
Owner

@Classic298 commented on GitHub (Feb 3, 2026):

Models respect their assigned Knowledgebases, even if Tool Calling = native and Built in Tools = true.
Only Knowledgebases that are assigned to the model can be queried by the build in tools.

Why is this expected?
Even if i assign a knowledge base to a model, i can always attach additional knowledge bases to that model using the button in the chat interface.

Actual Behaviour
The Model ignores its configuration and searches every Knowledge Base reachable by the user account, returning data it should not have access to.

As intended - that's what it's supposed to do.

Not a bug.

<!-- gh-comment-id:3840339501 --> @Classic298 commented on GitHub (Feb 3, 2026): > Models respect their assigned Knowledgebases, even if Tool Calling = native and Built in Tools = true. > Only Knowledgebases that are assigned to the model can be queried by the build in tools. Why is this expected? Even if i assign a knowledge base to a model, i can always attach additional knowledge bases to that model using the button in the chat interface. > Actual Behaviour > The Model ignores its configuration and searches every Knowledge Base reachable by the user account, returning data it should not have access to. As intended - that's what it's supposed to do. Not a bug.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#139115