mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #9907] [MERGED] fix: re-enable tools in native function calls after first invocation #22436
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/9907
Author: @smonux
Created: 2/13/2025
Status: ✅ Merged
Merged: 2/13/2025
Merged by: @tjbck
Base:
dev← Head:dev📝 Commits (2)
86074cffix: re-enable tool use when sending tool outpute98f859format📊 Changes
1 file changed (+1 additions, -0 deletions)
View changed files
📝
backend/open_webui/utils/middleware.py(+1 -0)📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
When native tool call is enabled, the first call to the completions endpoint contains the "tools" property, but that's not true for the next invocations. This limits native function calling usefulness, and some providers like anthropic endpoint even rejects those invocations.
After the one line change, llm are able to
This has been commented in this closed pull request:
https://github.com/open-webui/open-webui/pull/7021
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.