Skip to content

Expand Usage Insights (API + UI) #9

@avishek0769

Description

@avishek0769

Summary

Add richer analytics beyond lifetime/grouped/top-chats to give users deeper visibility into model and chat usage.

Problem

Current usage endpoints are useful but limited for diagnosing cost drivers and behavior trends.

Expected Solution

Design and ship additional insights such as provider split, model efficiency, per-chat trend over time, peak usage windows, and optional estimated cost breakdown for BYOKs.

You have to improve the existing usage page with new visualizations (charts, tables) and filters to explore these insights effectively.

You can update the existing usage features if needed.

Scope

  • Backend:
    • backend/controllers/usage.controller.js
    • backend/routers/usage.route.js
  • Frontend:
    • src/pages/Usage.tsx
    • src/lib/api.ts

Acceptance Criteria

  • At least 3 new meaningful usage insights are exposed via API and shown in UI.
  • Usage page presents new insights with clear visualizations and filters.
  • Aggregation logic handles empty datasets and large histories safely.
  • Existing usage features remain backward compatible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfullstackIssues related to both frontend and backendmediumThis is issue is not easy to solve but not hard

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions