mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[PR #15733] [CLOSED] feat: Enable tool calling for custom models via API #39560
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/15733
Author: @csanz91
Created: 7/15/2025
Status: ❌ Closed
Base:
dev← Head:run_custom_models_tools_on_api_requests📝 Commits (1)
0ffce3ffeat: Enable tool calling for custom models via API📊 Changes
1 file changed (+187 additions, -8 deletions)
View changed files
📝
backend/open_webui/utils/middleware.py(+187 -8)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
This change enables the use of tools defined on custom models when making requests via the API. Previously, tool-calling functionality was only available when interacting with custom models through the web interface, creating an inconsistency in behavior. This PR resolves that gap by ensuring the server-side API handler correctly identifies and executes tools associated with a custom model during an API call.
Added
Support for tool execution on custom models when called from the API
Changed
The API middle ware handler logic has been updated to load and run tools defined in a custom model's configuration.
Deprecated
N/A
Removed
N/A
Fixed
N/A
Security
N/A
Breaking Changes
N/A
Additional Information
#14925
Screenshots or Videos
N/A
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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.