feat: LLM API 키 사용량 조회 추가 - #50
Merged
Merged
Conversation
Usage events have been landing since the gateway switched to the control plane, and nothing read them back out: the rows existed but no student could see what their own key had done. Days are KST calendar days and the series is gapless -- a day nobody called is a zero row. A hole in a chart reads as "no data reached us", which is a different and more alarming claim than "nobody called". Buckets follow requested_at, never arrival. Shipping is batched and at-least-once, so a call that straddles midnight arrives after calls that happened later, and bucketing by arrival would file it under the wrong day. reportedUntil is the newest arrival rather than the newest request time, because a batch still in flight holds calls older than one already stored. Rate-limited requests are counted apart from other failures: they are the one signal that says when to ask for a higher limit. Estimated token counts are counted too, so a total that is partly a guess does not read as measured. Usage is content, not standing -- a workspace owner without a grant is refused here exactly as at the key's detail.
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.
📝 작업내용
⭐️ 검증
💬 리뷰 포인트