mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[GH-ISSUE #6692] enh: open webui built-in usage tracking/limit #29977
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 @TheMatzy on GitHub (Nov 4, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/6692
Originally assigned to: @tjbck on GitHub.
Related:
Is your feature request related to a problem? Please describe.
I’m requesting a feature to implement usage quotas for OpenAI tokens on a per-user basis, allowing administrators to set a token limit for each user over a customizable period (e.g., 10,000 tokens every 30 days). This would enable fair and efficient usage of OpenAI resources, similar to how platforms like Nextcloud allow administrators to set and manage usage quotas.
Describe the solution you’d like
The feature would allow administrators to configure token usage limits for individual users over a specified timeframe (e.g., per 30 days), with the flexibility to adjust the token limit and the period based on user needs. Key aspects would include:
Configurable Token Limit per User Over a Period:
Usage Tracking and Notification:
Admin Dashboard for Monitoring Usage:
Quota Refresh System:
Describe alternatives you’ve considered
An alternative might involve hard-coded usage limits, but these lack the flexibility of adjustable quotas. The Nextcloud model, which offers configurable per-user usage limits, serves as a practical example of how this could work efficiently.
Additional context
Implementing this feature would enhance OpenAI's usability for teams and educational or testing environments by promoting fair usage without overextending resources.
Nextcloud Usage Limit

@Simon-Stone commented on GitHub (Feb 2, 2025):
That is a great idea, but can be more complex than it seems.
For example, we are piping in multiple providers like Anthropic and Google. Just counting tokens is then not enough, because what we really want to control is cost. Every model has different pricing so tokens map very differently to dollars. We also want to make sure that the total cost doesn't exceed a certain limit, not just per model.
Finally, we want to assign credit to each user based on groups, where the total credit would be sum of all their groups' allowances.
To deal with all this, we are working on a tracking toolkit that we intend to make available as a separate library. Feel free to check it out, if you need some more advanced controls. It's still very early in development and not actually functional, yet:
https://github.com/dartmouth/openwebui-token-tracking
@drorm commented on GitHub (Feb 4, 2025):
This might be useful:
https://docs.litellm.ai/docs/proxy/cost_tracking
@Mte90 commented on GitHub (Feb 11, 2025):
any plan for this?
@flefevre commented on GitHub (Feb 11, 2025):
Finally here we report all tracing with litellm and Langfuse , they have
good integration with open webui
What is missing is the conversion in the terms of energy cost
Le mar. 11 févr. 2025, 11:16, Daniele Scasciafratte <
@.***> a écrit :
@OrenZhang commented on GitHub (Mar 4, 2025):
Token usage limit is not enough, we need credit limit, thanks!
@dotmobo commented on GitHub (Apr 9, 2025):
+1
@spammenotinoz commented on GitHub (Apr 14, 2025):
Agree, except API usage it not logged, just the web call.
@drorm commented on GitHub (May 7, 2025):
So for up-to-date pricing info check out:
https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json
Which litellm themselves download from
https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json
when you include their library.
Also be aware that the semantics of what is "input" vs "cached" is somewhat different between openai and anthropic when using "usage_metadata"
I wish we had a clean library for just cost calculation across vendors, but I'm not seeing one.
@gerald-CL commented on GitHub (Jun 26, 2025):
Any updates on this topic? It's an excellent idea.
@flefevre commented on GitHub (Jul 12, 2025):
That's song good but If I do understand, you are going to re implement inference tracking limit inside open webui even if it is already well done in LiteLLM which is already fully compatible with Openwebui.
To my point of view there is another tracking limit which seems more relevant to open webui the one on disk usage for knowledge base and note. RAG feature is really well implemented in Open Webui, thanks to Openwebui team for that! It is a key differenciator. I have tried to put some idea here. Feature Request: Admin-Defined Quotas for Knowledge Bases and Notes with Usage Insights and Cleanup Tools #15674 . It is just an idea to extend tracking usage in both directions inference and disk usage. And to be more disruptive, open Webui could be the first one to enable energy/carbon tracking by weighting token inference with model size and GPU with ecologist library.
@tjbck commented on GitHub (Apr 14, 2026):
#21675