feat(api): expose model_source filter in dashboard endpoints

Add model_source query parameter to GetModelStats and GetUserBreakdown handlers with explicit IsValidModelSource validation. Include model_source in cache key to prevent cross-source cache hits. Expose upstream_model in usage log DTO with omitempty semantics.
This commit is contained in:
Ethan0x0000
2026-03-17 19:26:11 +08:00
parent 7134266acf
commit 56fcb20f94
5 changed files with 24 additions and 2 deletions

View File

@@ -200,6 +200,7 @@ func (h *DashboardHandler) buildSnapshotV2Response(
filters.APIKeyID,
filters.AccountID,
filters.GroupID,
usagestats.ModelSourceRequested,
filters.RequestType,
filters.Stream,
filters.BillingType,