mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[PR #17898] [CLOSED] FEAT: Support sequential tool chaining in Default Function Calling Mode. #63450
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/17898
Author: @rgaricano
Created: 9/29/2025
Status: ❌ Closed
Base:
dev← Head:dev-MultiTool_Default_Function_Calling📝 Commits (7)
b4f438fFEAT: Support sequential tool chaining in Default Function Calling Mode.ebb7612Update env.py - Support sequential tool chaining in Default Function Calling Mode.147644dUpdate config.py - Support sequential tool chaining in Default Function Calling Mode.20d44b1Update middleware.py - Format03c7e5bUpdate env.py - Fixed Formatd0c7751Update middleware.py - Fix Format5e2c205Update middleware.py - Fix Format📊 Changes
3 files changed (+239 additions, -199 deletions)
View changed files
📝
backend/open_webui/config.py(+21 -22)📝
backend/open_webui/env.py(+8 -0)📝
backend/open_webui/utils/middleware.py(+210 -177)📄 Description
FEAT: Support Sequential Tool chaining in Default Function Calling Mode.
Modificated middleware for support sequential tool calls.
Added a retry counter for default mode tool calls.
Implemented a loop that continues processing until no more tool calls are needed.
Allow the LLM to make additional tool calls based on previous results.
Added env var CHAT_RESPONSE_MAX_TOOL_CALL_RETRIES (default=5) to set the max number of iterations of tool calls, to prevent infinite or too long loop.
Modified Tools Prompt for instruction the LLM on how to use sequential tools..
Recommended add the new prompt in adminSettings/Interface/Tools Function Calling Prompt for update this default prompt in database.
Tested:

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.