pipelines icon indicating copy to clipboard operation
pipelines copied to clipboard

feat: Implement USD limits per time period per user

Open NightMachinery opened this issue 1 year ago • 3 comments

Feature Request: Per-User Monthly Spending Limits

Description:

I appreciate the global request limits added in Issue #20. However, I need the ability to set customizable monthly spending limits per user.

Use Case:

I want to give my family and friends access to LLMs through Open WebUI, but I need to control costs by limiting how much each user can spend per month in USD.

Potential Solutions and Considerations:

  • Per-User Spending Limits:

    • Allow setting individual monthly spending caps for each user.
  • Cost Estimation:

    • Since determining the exact cost per model usage can be challenging, consider using heuristics such as:
      • Estimating costs based on token usage or number of requests.
      • Assigning a fixed cost per action or session.
  • Alternative Approaches:

    • Implement per-user limits on usage metrics like tokens or requests, which correlate with costs.

Benefits:

  • Helps manage and predict overall spending.
  • Enables sharing access with others without unexpected expenses.

Thank you for considering this feature request.

NightMachinery avatar Sep 23 '24 12:09 NightMachinery

can we just create a pipeline for this (not a filter, but a pipe), one that will add delays instead of raising an exception when the limit is exceeded.

FarisHijazi avatar Dec 01 '24 00:12 FarisHijazi

@FarisHijazi I don't think delaying is reasonable on the timescale of months suggested by @NightMachinery. What you describe sounds more like (the usual) rate limiting, which in my opinion is a separate issue.

NicoWeio avatar May 05 '25 17:05 NicoWeio

Has the rate-limiting feature been implemented?

stardevelop avatar May 23 '25 15:05 stardevelop