Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Conversation

@keegangeorge
Copy link
Member

@keegangeorge keegangeorge commented Apr 17, 2025

🔍 Overview

This update adds metrics for estimated spending in AI usage. To make use of it, admins must add cost details to the LLM config page (input, output, and cached input costs per 1M tokens). After doing so, the metrics will appear in the AI usage dashboard as the AI plugin is used.

📸 Screenshots

llm-config-page
tile-spending
table-spending

You currently cannot access the seeded model edit page, so there's no need to conditionally show certain elements based on if it's seeded. This commit removes those conditional checks. Additionally, it redirects the route if the model is seeded to avoid accessing it via the url.
@keegangeorge keegangeorge changed the title DEV: Add spending metrics to AI usage FEATURE: Add spending metrics to AI usage Apr 17, 2025
@keegangeorge keegangeorge marked this pull request as ready for review April 17, 2025 17:44
@xfalcox
Copy link
Member

xfalcox commented Apr 17, 2025

Can you share a screenshot of how it looks when the costs are nil ? Both the form and the usage page

@xfalcox
Copy link
Member

xfalcox commented Apr 17, 2025

@awesomerobot do you want to do a pass on the form?

@keegangeorge
Copy link
Member Author

keegangeorge commented Apr 17, 2025

Can you share a screenshot of how it looks when the costs are nil ? Both the form and the usage page

@xfalcox The form just has blank input. And the usage page shows $0, but I have this tooltip:
Screenshot 2025-04-17 at 11 56 15

@xfalcox
Copy link
Member

xfalcox commented Apr 17, 2025

Can you share a screenshot of how it looks when the costs are nil ? Both the form and the usage page

@xfalcox The form just has blank input. And the usage page shows $0, but I have this tooltip: Screenshot 2025-04-17 at 11 56 15

I wonder if we should hide the total box and the columns when it's all zeroes...

On one hand it showcases the feature so people know that they can fill that, on the other hand it may be just noise if no ones fills it.

@keegangeorge
Copy link
Member Author

I wonder if we should hide the total box and the columns when it's all zeroes...

On one hand it showcases the feature so people know that they can fill that, on the other hand it may be just noise if no ones fills it.

I was thinking about this too, but we would also have to account for the case where models have a cost metric assigned through the form, but with lack of usage there is a $0 estimated cost. So in that case, the box should probably appear and show $0.

I thought it'd be simpler just to leave it always there and have the tooltip.

But I'm open to changing if we prefer otherwise.

@keegangeorge keegangeorge merged commit d26c7ac into main Apr 17, 2025
6 checks passed
@keegangeorge keegangeorge deleted the costs-metric branch April 17, 2025 22:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants