lulululu-debug opened a new pull request, #220:
URL: https://github.com/apache/casbin-gateway/pull/220

   ### What
   
   Adds a token-usage dashboard on top of the existing LLM records. A new 
admin-only endpoint GET /api/get-llm-usage aggregates usage over a time window 
and returns:
   
   - totals — request count and summed prompt / completion / total tokens;
   - overTime — tokens per time bucket (hour / day / month) to chart the trend;
   - byModel / byChannel / byAgent — the top 8 consumers by total tokens.
   
   It honours the same filters (model, channel, agent, outcome) as the record 
list. The frontend renders it as an LlmUsagePanel on the records page, with 
en/zh strings.
   
   ### Why
   
   Gateway already records every LLM request but offered no rollup. Aggregating 
usage gives admins a cost/capacity view — who consumes the most tokens, through 
which channel, and how it trends over time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to