mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
Exclude unknown providers from usage aggregations
This commit is contained in:
@@ -163,12 +163,19 @@ pub(super) async fn build_admin_usage_aggregation_stats_response(
|
||||
"api_format" => UsageAuditAggregationGroupBy::ApiFormat,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
let exclude_reserved_provider_labels = matches!(
|
||||
group_by_query,
|
||||
UsageAuditAggregationGroupBy::Model
|
||||
| UsageAuditAggregationGroupBy::Provider
|
||||
| UsageAuditAggregationGroupBy::ApiFormat
|
||||
);
|
||||
let usage = state
|
||||
.aggregate_usage_audits(&UsageAuditAggregationQuery {
|
||||
created_from_unix_secs,
|
||||
created_until_unix_secs,
|
||||
group_by: group_by_query,
|
||||
limit,
|
||||
exclude_reserved_provider_labels,
|
||||
})
|
||||
.await?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user