fix: 未设置价格模型不会被拉取,除非设置自用模式

This commit is contained in:
Xyfacai
2025-11-13 18:44:18 +08:00
parent 4419be9c09
commit 06cd774c10
2 changed files with 39 additions and 0 deletions

View File

@@ -823,3 +823,16 @@ func FormatMatchingModelName(name string) string {
}
return name
}
// result: 倍率or价格 usePrice exist
func GetModelRatioOrPrice(model string) (float64, bool, bool) { // price or ratio
price, usePrice := GetModelPrice(model, false)
if usePrice {
return price, true, true
}
modelRatio, success, _ := GetModelRatio(model)
if success {
return modelRatio, false, true
}
return 37.5, false, false
}