Skip to content

feat: implement ListModelUsageSummaries#81

Merged
kkaneda merged 2 commits into
mainfrom
kenji/impl-api
Jul 18, 2025
Merged

feat: implement ListModelUsageSummaries#81
kkaneda merged 2 commits into
mainfrom
kenji/impl-api

Conversation

@kkaneda

@kkaneda kkaneda commented Jul 18, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions Bot added the enhancement New feature or request label Jul 18, 2025
@kenji-cloudnatix kenji-cloudnatix requested a review from Copilot July 18, 2025 04:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements the ListModelUsageSummaries functionality to provide time-series data for model usage statistics. The implementation includes API endpoint logic, time range filtering, and user visibility controls.

  • Adds server-side implementation for listing model usage summaries with hourly aggregation
  • Implements time range filtering with configurable start/end timestamps and default 7-day duration
  • Includes comprehensive test coverage for both the main functionality and time filtering logic

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
server/internal/server/model_usage_summaries.go Core implementation of ListModelUsageSummaries endpoint with time filtering and user visibility logic
server/internal/server/model_usage_summaries_test.go Comprehensive test suite covering main functionality and edge cases for time filtering
server/internal/store/summary_test.go Removes trailing whitespace from existing test file
go.mod Adds google/go-cmp dependency for test comparisons

Comment thread server/internal/server/model_usage_summaries_test.go Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kkaneda kkaneda merged commit 2fea2f9 into main Jul 18, 2025
2 checks passed
@kkaneda kkaneda deleted the kenji/impl-api branch July 18, 2025 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants