issue: Using "tools" causes the API to be called twice. #4834

Closed
opened 2025-11-11 16:04:12 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @KingPollux on GitHub (Apr 14, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

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

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

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.

Image

Image

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).

Image

Additional Information

non

Originally created by @KingPollux on GitHub (Apr 14, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### 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 - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### 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. ![Image](https://github.com/user-attachments/assets/d1a18e68-6da3-4474-8b05-9325832022aa) ![Image](https://github.com/user-attachments/assets/0ee52ea3-a521-47d0-b45a-c6714f66a38e) ### 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). ![Image](https://github.com/user-attachments/assets/dfd970a7-9899-4a78-8393-e5b2e99d8946) ### Additional Information non
GiteaMirror added the bug label 2025-11-11 16:04:12 -06:00
Author
Owner

@tjbck commented on GitHub (Apr 14, 2025):

Intended behaviour.
https://docs.openwebui.com/features/plugin/tools/

@tjbck commented on GitHub (Apr 14, 2025): Intended behaviour. https://docs.openwebui.com/features/plugin/tools/
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#4834