mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-01 03:17:20 -05:00
[GH-ISSUE #20415] issue:[Bug] Native Function Calling fails with multiple tools having long descriptions (Gemini 3 Flash Preview via OpenRouter) #89919
Reference in New Issue
Block a user
Originally created by @FujinoXiao on GitHub (Jan 6, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20415
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.6.43
Ollama Version (if applicable)
No response
Operating System
ubuntu22.04
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
When using google/gemini-3-flash-preview model via OpenRouter with Native Function Calling enabled, the model should be able to handle multiple tools (2 or more) with longer descriptions and return responses normally.
Actual Behavior
When adding 2 or more tools with longer descriptions and enabling Native Function Calling, the model fails to return any response. The error message shows "Provider returned error" with no additional details.
Note: This issue does NOT occur when:
Using only 1 tool, OR
Using 2+ tools with shorter descriptions, OR
Using non-native function calling (disabling Native Function Calling works fine)
This suggests the issue may be related to how Open WebUI handles the tool schema conversion for Native Function Calling when the total schema size is large.
Steps to Reproduce
Steps to Reproduce:
Set up OpenRouter API connection in Open WebUI
Select google/gemini-3-flash-preview model
Enable "Native Function Calling" in model settings
Create two test tools with long descriptions (see example below):
Tool 1 (test_tool_1.py)
`
class Tools:
def init(self):
pass
`
Tool 2 (test_tool_2.py): (identical to Tool 1)
Add both tools to the conversation
Send any simple message (e.g., "hello")
Observe: No response is returned, error shows "Provider returned error"
Works fine when:
Only 1 tool is added
Native Function Calling is disabled
Tools have shorter descriptions
Logs & Screenshots
Additional Information
No response
@pr-validator-bot commented on GitHub (Jan 6, 2026):
⚠️ Invalid Issue Title
Hey @qq3829596922, please provide a descriptive title for your issue. Titles that are empty, very short (under 10 characters), or generic (like "issue:") make it difficult for volunteer contributors to understand and triage issues.
Please update the title to reflect the content of your issue.
@FujinoXiao commented on GitHub (Jan 7, 2026):
updated