feat: publish sanitized custom.97 source

This commit is contained in:
cneicy committed 2026-10-27 20:43:39 +08:00
1 parent 8e6ed0317b
commit 86c0276156
1022 files changed
+69903 -19207

No files matched your search

+7 -1
View File
@@ -4,6 +4,7 @@ import (
"net/http"
"strconv"
"github.com/QuantumNous/new-api/common"
perfmetrics "github.com/QuantumNous/new-api/pkg/perf_metrics"
"github.com/QuantumNous/new-api/setting/ratio_setting"
@@ -19,8 +20,13 @@ func GetPerfMetricsSummary(c *gin.Context) {
}
}
recentModels := c.QueryArray("recent_model")
if len(recentModels) > perfmetrics.MaxRecentModels {
common.ApiErrorStatus(c, http.StatusBadRequest, common.NewMessage("Invalid parameters"))
return
}
activeGroups := append(lo.Keys(ratio_setting.GetGroupRatioCopy()), "auto")
result, err := perfmetrics.QuerySummaryAll(hours, activeGroups)
result, err := perfmetrics.QuerySummaryAll(hours, activeGroups, recentModels...)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{
"success": false,