feat: add detailed token usage and model usage over time dashboard charts#5596
Open
ink-the-squid wants to merge 2 commits intoHelicone:mainfrom
Open
feat: add detailed token usage and model usage over time dashboard charts#5596ink-the-squid wants to merge 2 commits intoHelicone:mainfrom
ink-the-squid wants to merge 2 commits intoHelicone:mainfrom
Conversation
Adds two new dashboard panels: 1. Token Usage by Type - line chart showing prompt, completion, reasoning, cache read, and cache write tokens over time. Only shows lines for token types that have non-zero data. 2. Model Usage Over Time - line chart showing request count per model over time. Shows top 8 models with an 'other' bucket. Backend: - New POST /v1/metrics/detailedTokensOverTime endpoint - New POST /v1/metrics/modelUsageOverTime endpoint - Uses existing ClickHouse columns (reasoning_tokens, prompt_cache_read_tokens, prompt_cache_write_tokens) Frontend: - DetailedTokenUsagePanel and ModelUsageOverTimePanel components - Added to dashboard grid layout - Includes mock data for onboarding state
|
@ink-the-squid is attempting to deploy a commit to the Helicone Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds two new charts to the dashboard:
1. Token Usage by Type
Line chart with separate lines for each token type:
Only shows lines for token types with non-zero data, so it stays clean for users not using caching or reasoning models.
2. Model Usage Over Time
Line chart showing request count per model over time:
Backend
POST /v1/metrics/detailedTokensOverTime— returns all token types per time bucketPOST /v1/metrics/modelUsageOverTime— returns request count + total tokens grouped by model and timeBoth endpoints use existing ClickHouse columns (
reasoning_tokens,prompt_cache_read_tokens,prompt_cache_write_tokens).Why
Helps customers understand: