From 9c4684b0e295ff70e5aa38f3b8e4d0331d37949d Mon Sep 17 00:00:00 2001 From: wood chen Date: Tue, 18 Mar 2025 10:11:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A8=A1=E5=9E=8B=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91=EF=BC=8C=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E5=AF=B9=E7=89=B9=E6=AE=8A=E6=A0=87=E8=AE=B0=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E8=B7=B3=E8=BF=87=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 UpdateOtherPrices 函数中移除对包含":free"和":extended"标记模型的跳过逻辑 - 增强黑名单检查机制,确保模型名称的准确性和完整性 - 简化代码逻辑,提高可读性 --- backend/cron/openrouter-api/update-other-price.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/backend/cron/openrouter-api/update-other-price.go b/backend/cron/openrouter-api/update-other-price.go index 826c3a0..0a19165 100644 --- a/backend/cron/openrouter-api/update-other-price.go +++ b/backend/cron/openrouter-api/update-other-price.go @@ -33,6 +33,7 @@ var blacklist = []string{ "claude-3-haiku", "claude-3-opus", "claude-3-sonnet", + ":", } const ( @@ -76,13 +77,6 @@ func UpdateOtherPrices() error { author := parts[0] modelName := parts[1] - // 直接跳过包含":free"或":extended"的模型 - if strings.Contains(modelName, ":free") || strings.Contains(modelName, ":extended") { - log.Printf("跳过带特殊标记的模型: %s", modelData.Slug) - skippedCount++ - continue - } - // 检查是否在黑名单中 if isInBlacklist(modelName) { log.Printf("跳过黑名单模型: %s", modelName)