Commit 3f7d9c4b by 1808837298@qq.com

fix: Improve error handling for model ratio and price validation #800

parent 159f39d1
......@@ -147,8 +147,8 @@ func testChannel(channel *model.Channel, testModel string) (err error, openAIErr
}
modelPrice, usePrice := common.GetModelPrice(testModel, false)
modelRatio, success := common.GetModelRatio(testModel)
if !success {
return fmt.Errorf("模型 %s 倍率未设置", testModel), nil
if !usePrice && !success {
return fmt.Errorf("模型 %s 倍率和价格均未设置", testModel), nil
}
completionRatio := common.GetCompletionRatio(testModel)
ratio := modelRatio
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment