[PR #23465] [CLOSED] fix: include built-in tools in __tools__ for Pipe functions #130877

Closed
opened 2026-05-21 15:37:11 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/23465
Author: @D2758695161
Created: 4/7/2026
Status: ❌ Closed

Base: main ← Head: fix/builtin-tools-in-pipes


📝 Commits (1)

  • 686dc3e fix: include built-in tools in tools for Pipe functions

📊 Changes

1 file changed (+12 additions, -1 deletions)

View changed files

📝 backend/open_webui/functions.py (+12 -1)

📄 Description

Fix: Built-in tools missing from tools in Pipe functions

Issue: #23365

Root Cause: In backend/open_webui/functions.py, generate_function_chat_completion only calls get_tools() for user-defined tools, but never calls get_builtin_tools() for built-in tools (web_search, image_generation, execute_code, etc.).

Fix: Added call to get_builtin_tools() and merged results into extra_params['__tools__'] after the get_tools() call:

# Include built-in tools (web_search, image_generation, etc.)
builtin_tools = get_builtin_tools(
    request,
    extra_params,
    metadata.get('features', {}),
    model_info,
)
for name, tool_dict in builtin_tools.items():
    if name not in extra_params['__tools__']:
        extra_params['__tools__'][name] = tool_dict

This ensures that when a Pipe function receives __tools__, it includes all available tools — both user-defined and built-in — matching the behavior in middleware.py.

Fixes #23365


🔄 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/23465 **Author:** [@D2758695161](https://github.com/D2758695161) **Created:** 4/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/builtin-tools-in-pipes` --- ### 📝 Commits (1) - [`686dc3e`](https://github.com/open-webui/open-webui/commit/686dc3e118092e215f8852beefe1d7913fa9b888) fix: include built-in tools in __tools__ for Pipe functions ### 📊 Changes **1 file changed** (+12 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/functions.py` (+12 -1) </details> ### 📄 Description ## Fix: Built-in tools missing from __tools__ in Pipe functions **Issue:** #23365 **Root Cause:** In `backend/open_webui/functions.py`, `generate_function_chat_completion` only calls `get_tools()` for user-defined tools, but never calls `get_builtin_tools()` for built-in tools (web_search, image_generation, execute_code, etc.). **Fix:** Added call to `get_builtin_tools()` and merged results into `extra_params['__tools__']` after the `get_tools()` call: ```python # Include built-in tools (web_search, image_generation, etc.) builtin_tools = get_builtin_tools( request, extra_params, metadata.get('features', {}), model_info, ) for name, tool_dict in builtin_tools.items(): if name not in extra_params['__tools__']: extra_params['__tools__'][name] = tool_dict ``` This ensures that when a Pipe function receives `__tools__`, it includes all available tools — both user-defined and built-in — matching the behavior in `middleware.py`. Fixes #23365 --- <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-05-21 15:37:11 -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#130877