Add feature column to microdollar usage API responses#363
Open
kiloconnect[bot] wants to merge 1 commit intomainfrom
Open
Add feature column to microdollar usage API responses#363kiloconnect[bot] wants to merge 1 commit intomainfrom
kiloconnect[bot] wants to merge 1 commit intomainfrom
Conversation
- Added feature information to organization usage timeseries endpoint - Added feature information to organization usage details endpoint (daily) - Added feature to UsageDetailByDay TypeScript type - Joined with microdollar_usage_metadata and feature tables to expose feature data
| kilocode_users.google_user_email, | ||
| ...(groupByModel ? [microdollar_usage.model] : []) | ||
| ...(groupByModel ? [microdollar_usage.model] : []), | ||
| feature.feature |
Contributor
Author
There was a problem hiding this comment.
[WARNING]: Unconditional feature.feature in GROUP BY is a behavioral change
feature.feature is always included in the GROUP BY here, unlike model which is conditional on groupByModel. This means the get endpoint will now return more granular rows — previously one row per date/user (or date/user/model), now split further by feature. Existing consumers that aggregate or display these results may see unexpected changes (e.g., multiple rows where there used to be one).
Consider either:
- Making this conditional via a
groupByFeatureinput flag (consistent withgroupByModel), or - Confirming that all consumers of this endpoint are prepared for the increased row count.
Contributor
Author
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (2 files)
|
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.
Summary
This PR adds the column to the microdollar usage API responses for organization-level usage endpoints. The feature data is already present in the database schema (via the table linked through ), so this change simply exposes it in the API.
Changes Made
Organization Usage Timeseries Endpoint ():
Organization Usage Details Endpoint (Daily) ():
TypeScript Types ():
Notes
Built for Brendan by Kilo for Slack