feat: per-plugin cost trend + threshold warnings (closes #201)#502
Merged
vivekchand merged 1 commit intomainfrom Apr 2, 2026
Merged
feat: per-plugin cost trend + threshold warnings (closes #201)#502vivekchand merged 1 commit intomainfrom
vivekchand merged 1 commit intomainfrom
Conversation
- Track per-day plugin token/cost breakdown in _compute_transcript_analytics - Add _compute_plugin_trend() helper: compares recent 7d vs prior 7d cost share and returns 'increasing' / 'decreasing' / 'stable' - Enhance GET /api/usage/by-plugin: each row now includes a trend field; warnings[] array emitted when plugin cost share exceeds threshold (default 50%) - New GET /api/usage/by-plugin/trend?days=N: returns daily time-series for all plugins in the requested window (default 14 days, max 90) enabling frontend charts and 'which plugins are getting more expensive?' analysis - 6 new tests covering both endpoints and threshold/trend fields
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.
Closes #201. Adds per-plugin cost trend tracking, 7-day comparison, and threshold warnings.