ソースを参照

Merge pull request #185 from h1xy/main

Fix: CompletionRatio is not working for openrouter.ai
Calcium-Ion 1 年間 前
コミット
89efed48fc
1 ファイル変更3 行追加3 行削除
  1. 3 3
      common/model-ratio.go

+ 3 - 3
common/model-ratio.go

@@ -206,11 +206,11 @@ func GetCompletionRatio(name string) float64 {
 		}
 		return 2
 	}
-	if strings.HasPrefix(name, "claude-instant-1") {
+	if strings.Contains(name, "claude-instant-1") {
 		return 3
-	} else if strings.HasPrefix(name, "claude-2") {
+	} else if strings.Contains(name, "claude-2") {
 		return 3
-	} else if strings.HasPrefix(name, "claude-3") {
+	} else if strings.Contains(name, "claude-3") {
 		return 5
 	}
 	if strings.HasPrefix(name, "mistral-") {