[GH-ISSUE #20549] issue: Native tools are injected when models are used over the openwebui API. #34748

Closed
opened 2026-04-25 08:53:24 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @LysanderdeJong on GitHub (Jan 10, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20549

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.1

Ollama Version (if applicable)

No response

Operating System

Debian 13

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 calling a model over the Open WebUI API (e.g., /api/v1/chat/completions) with an explicit tools parameter in the request payload, the model should only have access to the tools provided directly in that API call.

Built-in tools that are enabled in the model's settings (such as web search, calculator, etc.) should not be injected into API requests, even when:

  • Native tool calling is enabled for the model
  • Built-in tools are enabled in the model configuration
  • The model has these tools available in the web UI

The API should behave independently from the web UI configuration, respecting only the tools explicitly defined in the API request. This allows external applications to use Open WebUI as an API proxy with their own custom tool definitions without interference from the model's UI-specific settings.

Actual Behavior

When using a model over the Open WebUI API with built-in tools enabled in the model settings and native tool calling configured, the built-in tools are incorrectly injected into the API request. This results in:

  1. Built-in tools overriding custom tools: The tools explicitly provided in the API call's tools parameter are replaced or overshadowed by the model's configured built-in tools
  2. Loss of custom tool functionality: External applications cannot pass their own tools to the model because the built-in tools take precedence
  3. Inconsistent API behavior: The API does not respect the tools parameter as expected in OpenAI-compatible APIs

Steps to Reproduce

Step-by-Step Reproduction:

  1. Environment Setup:

    • Install Open WebUI v0.7.1 on Debian 13
    • Start Open WebUI using Docker:
      docker run -d -p 3000:8080 --name open-webui ghcr.io/open-webui/open-webui:v0.7.1
      
    • Access the admin panel at http://localhost:3000
  2. Configure Model Settings:

    • Navigate to: Workspace → Models
    • Select a model (e.g., GPT-4, Claude, or any OpenAI-compatible model)
    • Click the edit (pen) icon
    • In the model configuration:
      • Enable "Built-in Tools" (toggle ON)
      • Enable specific built-in tools (e.g., web_search, calculator)
      • Set "Tool Calling Mode" to "Native"
    • Click "Save & Update"
  3. Verify Built-in Tools Configuration:

    • In Admin Settings → Functions
    • Confirm that native function calling is enabled
    • Note which built-in tools are available (e.g., web_search)
  4. Make API Call with Custom Tools:

    • Create a test script to call the Open WebUI API endpoint:
    import requests
    import json
    
    url = "http://localhost:3000/api/v1/chat/completions"
    headers = {
        "Authorization": "Bearer YOUR_API_TOKEN",
        "Content-Type": "application/json"
    }
    
    payload = {
        "model": "your-model-name",
        "messages": [
            {"role": "user", "content": "What tools do you have access to?"}
        ],
        "tools": [
            {
                "type": "function",
                "function": {
                    "name": "my_custom_tool",
                    "description": "A custom tool for testing",
                    "parameters": {
                        "type": "object",
                        "properties": {
                            "input": {
                                "type": "string",
                                "description": "Input parameter"
                            }
                        },
                        "required": ["input"]
                    }
                }
            }
        ]
    }
    
    response = requests.post(url, headers=headers, json=payload)
    print(json.dumps(response.json(), indent=2))
    
  5. Observe the Actual Behavior:

    • Run the script
    • Check the model's response about available tools
    • Expected: Model should only see "my_custom_tool"
    • Actual: Model sees built-in tools (web_search, etc.) INSTEAD OF or IN ADDITION TO the custom tool
    • The built-in tools override or interfere with the explicitly provided API tools
  6. Verify the Bug:

    • Compare with screenshots: The API response shows built-in tools are injected
    • Note that external/custom tools from the API are not available to the model
  7. Test Workaround:

    • Go back to model settings
    • Disable "Built-in Tools" (toggle OFF)
    • Save the model configuration
    • Re-run the same API call from step 4
    • Result: Now the custom tool "my_custom_tool" appears correctly
    • Built-in tools are no longer injected

Logs & Screenshots

Here is an example of an external notes app unable to call it's own tools.

With built-in tools enabled, external tools over the API are overwritten:
Image

With built-in tools disabled, external tools show back up.
Image

Additional Information

No response

Originally created by @LysanderdeJong on GitHub (Jan 10, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/20549 ### 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.1 ### Ollama Version (if applicable) _No response_ ### Operating System Debian 13 ### 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 calling a model over the Open WebUI API (e.g., `/api/v1/chat/completions`) with an explicit `tools` parameter in the request payload, the model should only have access to the tools provided directly in that API call. Built-in tools that are enabled in the model's settings (such as web search, calculator, etc.) should not be injected into API requests, even when: - Native tool calling is enabled for the model - Built-in tools are enabled in the model configuration - The model has these tools available in the web UI The API should behave independently from the web UI configuration, respecting only the tools explicitly defined in the API request. This allows external applications to use Open WebUI as an API proxy with their own custom tool definitions without interference from the model's UI-specific settings. ### Actual Behavior When using a model over the Open WebUI API with built-in tools enabled in the model settings and native tool calling configured, the built-in tools are incorrectly injected into the API request. This results in: 1. Built-in tools overriding custom tools: The tools explicitly provided in the API call's `tools` parameter are replaced or overshadowed by the model's configured built-in tools 2. Loss of custom tool functionality: External applications cannot pass their own tools to the model because the built-in tools take precedence 3. Inconsistent API behavior: The API does not respect the tools parameter as expected in OpenAI-compatible APIs ### Steps to Reproduce Step-by-Step Reproduction: 1. Environment Setup: - Install Open WebUI v0.7.1 on Debian 13 - Start Open WebUI using Docker: ```bash docker run -d -p 3000:8080 --name open-webui ghcr.io/open-webui/open-webui:v0.7.1 ``` - Access the admin panel at http://localhost:3000 2. Configure Model Settings: - Navigate to: Workspace → Models - Select a model (e.g., GPT-4, Claude, or any OpenAI-compatible model) - Click the edit (pen) icon - In the model configuration: - Enable "Built-in Tools" (toggle ON) - Enable specific built-in tools (e.g., web_search, calculator) - Set "Tool Calling Mode" to "Native" - Click "Save & Update" 3. Verify Built-in Tools Configuration: - In Admin Settings → Functions - Confirm that native function calling is enabled - Note which built-in tools are available (e.g., web_search) 4. Make API Call with Custom Tools: - Create a test script to call the Open WebUI API endpoint: ```python import requests import json url = "http://localhost:3000/api/v1/chat/completions" headers = { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json" } payload = { "model": "your-model-name", "messages": [ {"role": "user", "content": "What tools do you have access to?"} ], "tools": [ { "type": "function", "function": { "name": "my_custom_tool", "description": "A custom tool for testing", "parameters": { "type": "object", "properties": { "input": { "type": "string", "description": "Input parameter" } }, "required": ["input"] } } } ] } response = requests.post(url, headers=headers, json=payload) print(json.dumps(response.json(), indent=2)) ``` 5. Observe the Actual Behavior: - Run the script - Check the model's response about available tools - **Expected:** Model should only see "my_custom_tool" - **Actual:** Model sees built-in tools (web_search, etc.) INSTEAD OF or IN ADDITION TO the custom tool - The built-in tools override or interfere with the explicitly provided API tools 6. Verify the Bug: - Compare with screenshots: The API response shows built-in tools are injected - Note that external/custom tools from the API are not available to the model 7. Test Workaround: - Go back to model settings - Disable "Built-in Tools" (toggle OFF) - Save the model configuration - Re-run the same API call from step 4 - **Result:** Now the custom tool "my_custom_tool" appears correctly - Built-in tools are no longer injected ### Logs & Screenshots Here is an example of an external notes app unable to call it's own tools. With built-in tools enabled, external tools over the API are overwritten: <img width="489" height="1040" alt="Image" src="https://github.com/user-attachments/assets/3409c33b-b7f7-4c7a-a7cc-0aa8e4bcbbde" /> With built-in tools disabled, external tools show back up. <img width="535" height="1040" alt="Image" src="https://github.com/user-attachments/assets/752b75ec-839e-4c4c-948c-421e5e00ba11" /> ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-25 08:53:24 -05:00
Author
Owner

@owui-terminator[bot] commented on GitHub (Jan 10, 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. #19864 issue: Ollama Parameters get overriden after native tool calls
    by Haervwe • Dec 10, 2025 • bug

  2. #20361 Issue: Large-scale model setting-related functionality fails.
    by shentong0722 • Jan 04, 2026 • bug

  3. #15078 issue: Missing or Erroneous tools list for non-native tool models preventing LLM using tools
    by mlaihk • Jun 17, 2025 • bug

  4. #20150 issue: Tools not included for models in channel messages
    by zhiweit • Dec 24, 2025 • bug

  5. #19610 issue: Models not appearing for non-admin users
    by westbrook-ai • Nov 30, 2025 • bug

Show 5 more related issues
  1. #19738 issue: Thinking models render responses inside thinking UI when using native tools
    by qq3829596922 • Dec 04, 2025 • bug

  2. #16833 issue: OpenWebUI executes user tools only if browser window is visible
    by semyonc • Aug 22, 2025 • bug

  3. #19899 issue: openrouter Models not showing up in the model selection list.
    by AZComputerSolutions • Dec 12, 2025 • bug

  4. #19711 issue: Editing function for models broken
    by skleffmann • Dec 03, 2025 • bug

  5. #19615 issue: [TEST] Models Not Available to Users
    by westbrook-ai • Nov 30, 2025 • 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:3732705505 --> @owui-terminator[bot] commented on GitHub (Jan 10, 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. [#19864](https://github.com/open-webui/open-webui/issues/19864) **issue: Ollama Parameters get overriden after native tool calls** *by Haervwe • Dec 10, 2025 • `bug`* 2. [#20361](https://github.com/open-webui/open-webui/issues/20361) **Issue: Large-scale model setting-related functionality fails.** *by shentong0722 • Jan 04, 2026 • `bug`* 3. [#15078](https://github.com/open-webui/open-webui/issues/15078) **issue: Missing or Erroneous tools list for non-native tool models preventing LLM using tools** *by mlaihk • Jun 17, 2025 • `bug`* 4. [#20150](https://github.com/open-webui/open-webui/issues/20150) **issue: Tools not included for models in channel messages** *by zhiweit • Dec 24, 2025 • `bug`* 5. [#19610](https://github.com/open-webui/open-webui/issues/19610) **issue: Models not appearing for non-admin users** *by westbrook-ai • Nov 30, 2025 • `bug`* <details> <summary>Show 5 more related issues</summary> 6. [#19738](https://github.com/open-webui/open-webui/issues/19738) **issue: Thinking models render responses inside thinking UI when using native tools** *by qq3829596922 • Dec 04, 2025 • `bug`* 7. [#16833](https://github.com/open-webui/open-webui/issues/16833) **issue: OpenWebUI executes user tools only if browser window is visible** *by semyonc • Aug 22, 2025 • `bug`* 8. [#19899](https://github.com/open-webui/open-webui/issues/19899) **issue: openrouter Models not showing up in the model selection list.** *by AZComputerSolutions • Dec 12, 2025 • `bug`* 9. [#19711](https://github.com/open-webui/open-webui/issues/19711) **issue: Editing function for models broken** *by skleffmann • Dec 03, 2025 • `bug`* 10. [#19615](https://github.com/open-webui/open-webui/issues/19615) **issue: [TEST] Models Not Available to Users** *by westbrook-ai • Nov 30, 2025 • `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 (Jan 10, 2026):

First of all this is not an issue but a feature request.

Next, your feature request boils down to this:

"The API should behave independently from the web UI configuration"

The answer is no. It should not.

This was asked in the past with different features as well where people asked for the system prompt of a model to not be included when querying the model via the API.

This was denied.

If you want the model to have no system prompt when querying it via the API, then don't give it a system prompt. You can create effectively a duplicate of the model by utilizing the workspace and give that a system prompt (or don't).

Same should be done here. Just disable native tools in the model capabilities and/or create a new model in the workspace which is just the base model with no modifications but tool calls enabled/disabled.

<!-- gh-comment-id:3732749082 --> @Classic298 commented on GitHub (Jan 10, 2026): First of all this is not an issue but a feature request. Next, your feature request boils down to this: > "The API should behave independently from the web UI configuration" The answer is no. It should not. This was asked in the past with different features as well where people asked for the system prompt of a model to not be included when querying the model via the API. This was denied. If you want the model to have no system prompt when querying it via the API, then don't give it a system prompt. You can create effectively a duplicate of the model by utilizing the workspace and give that a system prompt (or don't). Same should be done here. Just disable native tools in the model capabilities and/or create a new model in the workspace which is just the base model with no modifications but tool calls enabled/disabled.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#34748