mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-11 08:15:00 -05:00
issue: Using "tools" causes the API to be called twice. #4834
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?
Originally created by @KingPollux on GitHub (Apr 14, 2025).
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.6.4
Ollama Version (if applicable)
No response
Operating System
Ubuntu 22.04
Browser (if applicable)
Firefox,edge
Confirmation
README.md.Expected Behavior
Since my API is connected to a relay service, I can monitor the call activity.
Under normal use of the LLM, each conversation should trigger the API only once. However, I've observed that in certain cases, it gets called multiple times.
Actual Behavior
After I ask a question in the dialog, the API is called twice before answering. The first call returns some content length in the backend, but nothing is displayed on the frontend until the second automatic API call, after which the response finally appears.
This causes a noticeable delay in responses, especially for models with reasoning chains. Although the answers are correct, users have to wait an extra cycle.
Steps to Reproduce
After investigation, I found that when I go to Admin Settings -> LLM Model, select any model, check the "tools" option, and save it, that model will call the API twice during conversations. This slows down responses and wastes tokens.
Logs & Screenshots
The image below is a log file. The entire process involved only one conversation. I stated that it was a test conversation, and then the LLM responded. (Please disregard that I called two models, one responsible for thinking and the other for dialogue).
Additional Information
non
@tjbck commented on GitHub (Apr 14, 2025):
Intended behaviour.
https://docs.openwebui.com/features/plugin/tools/