The last 2 statusHistory of last message in a chat are lost #2862

Closed
opened 2025-11-11 15:15:58 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @houcheng on GitHub (Nov 28, 2024).

Bug Report

Hi,
I've configured a cost filter to calculate each chat message's price and it runs well during conversion. However, after clicking to another page and back, the last message's cost status always shows a pending icon with message: "Computing nubmer of output tokens...".

It's weird since I literalily saw the cost is calcuated during conversion. I'checked the REST API calls and found that the get_message_by_id() api calling returns the message[] and each one has a status history. The last message has some history lost.
Please see the attached image below.

I've also checked the system's cost Json cache. the data is in cache, seems no lost in cache file. Not sure which part cause this issue.

Installation Method

running as a docker in Ubuntu 24

Environment

  • Open WebUI Version: 0.4.6
  • Operating System: Ubuntu
  • Browser (if applicable): Chrome and firefox

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on 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 provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Reproduction Details

Steps to Reproduce:
Just install cost function, chat, go other chat and then back.

Logs and Screenshots

image

Originally created by @houcheng on GitHub (Nov 28, 2024). # Bug Report Hi, I've configured a cost filter to calculate each chat message's price and it runs well during conversion. However, after clicking to another page and back, the last message's cost status always shows a pending icon with message: "Computing nubmer of output tokens...". It's weird since I literalily saw the cost is calcuated during conversion. I'checked the REST API calls and found that the get_message_by_id() api calling returns the message[] and each one has a status history. The last message has some history lost. Please see the attached image below. I've also checked the system's cost Json cache. the data is in cache, seems no lost in cache file. Not sure which part cause this issue. ## Installation Method running as a docker in Ubuntu 24 ## Environment - **Open WebUI Version:** 0.4.6 - **Operating System:** Ubuntu - **Browser (if applicable):** Chrome and firefox **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on 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 provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Reproduction Details **Steps to Reproduce:** Just install cost function, chat, go other chat and then back. ## Logs and Screenshots ![image](https://github.com/user-attachments/assets/49ee610e-bfb8-483c-be00-70a5a78ea2c3)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#2862