Merge pull request #4431 from yyhhyyyyyy/fix/tiered-billing-model-list

fix: include tiered billing models in model listing
This commit is contained in:
yyhhyyyyyy authored and GitHub committed 2026-04-24 16:24:36 +08:00
1 parent 2e610e5fb3
commit e3d64cb76d
5 files changed
+272 -19

No files matched your search

+1 -13
View File
@@ -224,19 +224,7 @@ func ModelPriceHelperPerCall(c *gin.Context, info *relaycommon.RelayInfo) (types
}
func ContainPriceOrRatio(modelName string) bool {
_, ok := ratio_setting.GetModelPrice(modelName, false)
if ok {
return true
}
_, ok, _ = ratio_setting.GetModelRatio(modelName)
if ok {
return true
}
if billing_setting.GetBillingMode(modelName) == billing_setting.BillingModeTieredExpr {
_, ok = billing_setting.GetBillingExpr(modelName)
return ok
}
return false
return model.HasModelBillingConfig(modelName)
}
func modelPriceHelperTiered(c *gin.Context, info *relaycommon.RelayInfo, promptTokens int, meta *types.TokenCountMeta, groupRatioInfo types.GroupRatioInfo) (types.PriceData, error) {