Skip to content

Conversation

@jorgebaralt
Copy link
Contributor

3 new tables:

  • embedding-token-usage
  • llm-token-usage
  • model-prices

Add support for tracking user spending
All costs and prices are stored in cents, following the same standards as Stripe

@jorgebaralt jorgebaralt requested a review from rmolinamir August 23, 2025 21:55
@jorgebaralt
Copy link
Contributor Author

Update:

  • Removed Claude's wrong generated code.
  • infer model and provider from Mastra result
  • refactor db insertions/queries from api routes and moved to TRPC procedures

@jorgebaralt jorgebaralt requested a review from rmolinamir August 24, 2025 02:33
@jorgebaralt jorgebaralt merged commit 656ead7 into main Aug 26, 2025
3 checks passed
@jorgebaralt jorgebaralt deleted the feat/track-ai-usage branch August 26, 2025 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants