refactor: rename and relocate HasModelBillingConfig function for clarity

This commit is contained in:
CaIon
2026-04-24 16:39:12 +08:00
parent e3d64cb76d
commit 3a2138ba61
5 changed files with 17 additions and 41 deletions
+3 -2
View File
@@ -15,6 +15,7 @@ import (
"github.com/QuantumNous/new-api/relay/channel/minimax"
"github.com/QuantumNous/new-api/relay/channel/moonshot"
relaycommon "github.com/QuantumNous/new-api/relay/common"
"github.com/QuantumNous/new-api/relay/helper"
"github.com/QuantumNous/new-api/service"
"github.com/QuantumNous/new-api/setting/operation_setting"
"github.com/QuantumNous/new-api/types"
@@ -133,7 +134,7 @@ func ListModels(c *gin.Context, modelType int) {
}
for allowModel, _ := range tokenModelLimit {
if !acceptUnsetRatioModel {
if !model.HasModelBillingConfig(allowModel) {
if !helper.HasModelBillingConfig(allowModel) {
continue
}
}
@@ -180,7 +181,7 @@ func ListModels(c *gin.Context, modelType int) {
}
for _, modelName := range models {
if !acceptUnsetRatioModel {
if !model.HasModelBillingConfig(modelName) {
if !helper.HasModelBillingConfig(modelName) {
continue
}
}