From b93b20865978f50e402bfa8ce473f5d1c6df6108 Mon Sep 17 00:00:00 2001 From: inference-bot Date: Sun, 27 Sep 2026 22:39:54 -0600 Subject: [PATCH] Broker usage: expose allowance and credits buckets to dashboard --- app/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 708a3f1..abbf3f0 100644 --- a/app/main.py +++ b/app/main.py @@ -2104,7 +2104,8 @@ async def broker_get_usage(email: str, days: int = 0) -> dict: """ team_id = await litellm_get_or_create_team(email, get_member_balance(email)) - balance = get_member_balance(email) + allowance = get_member_balance(email) + credits = get_credit_balance(email) spend = 0.0 reset_at = None @@ -2126,6 +2127,8 @@ async def broker_get_usage(email: str, days: int = 0) -> dict: return { "email": email, "balance": balance, + "allowance": allowance, + "credits": credits, "spend": spend, "remaining": max(balance - spend, 0.0), "total_tokens": usage["totals"]["total_tokens"], @@ -2192,6 +2195,8 @@ async def broker_get_usage(email: str, days: int = 0) -> dict: return { "email": email, "balance": balance, + "allowance": allowance, + "credits": credits, "spend": spend, "remaining": max(balance - spend, 0.0), "total_tokens": total_tokens,