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

Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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
Confirmation:
Reproduction Details
Steps to Reproduce:
Just install cost function, chat, go other chat and then back.
Logs and Screenshots