[PR #20708] [CLOSED] fix: native function calling improvements for knowledge queries #25740

Closed
opened 2026-04-20 06:06:16 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/20708
Author: @Classic298
Created: 1/15/2026
Status: Closed

Base: devHead: fix-task-model-native-tools


📝 Commits (1)

📊 Changes

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

View changed files

📝 backend/open_webui/utils/middleware.py (+1 -0)

📄 Description

fix: native function calling improvements

Description

When native function calling was enabled, builtin tools were incorrectly injected into internal task model requests (title generation, follow-up generation, tags, etc.). This caused the task model to attempt tool calls with missing parameters, resulting in "missing required argument: query" errors.

Added a check to skip builtin tool injection when the request has a task type set in metadata.

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 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/20708 **Author:** [@Classic298](https://github.com/Classic298) **Created:** 1/15/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix-task-model-native-tools` --- ### 📝 Commits (1) - [`db3bb1c`](https://github.com/open-webui/open-webui/commit/db3bb1c3a3c19a4f78301193455b4b0de3dff4c3) Update middleware.py ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/utils/middleware.py` (+1 -0) </details> ### 📄 Description ## fix: native function calling improvements ### Description When native function calling was enabled, builtin tools were incorrectly injected into internal task model requests (title generation, follow-up generation, tags, etc.). This caused the task model to attempt tool calls with missing parameters, resulting in "missing required argument: query" errors. Added a check to skip builtin tool injection when the request has a task type set in metadata. ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <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-04-20 06:06:16 -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#25740