From 81ad8a787f28059b8018aca668787f8836090d8d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 24 Aug 2025 09:48:45 +0000 Subject: [PATCH 1/2] chore: sync VERSION file with release v1.1.120 [skip ci] --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 51f88d3c..872610a2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.119 +1.1.120 From 5366dc70e143fe618d383a5a08d452d2e39e5049 Mon Sep 17 00:00:00 2001 From: sczheng189 <724100151@qq.com> Date: Mon, 25 Aug 2025 11:44:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E7=8A=B6=E6=80=81=E5=90=8E=E4=BB=8D=E8=A2=AB?= =?UTF-8?q?=E8=AE=A4=E4=B8=BA=E4=B8=8D=E5=8F=AF=E7=94=A8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题描述: - 重置账号状态时虽然正确设置了 schedulable: 'true' - 但在账号选择逻辑中缺少对 schedulable !== 'false' 的检查 - 导致重置后的账号仍被认为不可用 修复内容: - selectAvailableAccount: 在 activeAccounts 过滤中添加 schedulable 检查 - selectAccountForApiKey: 在绑定账户和 sharedAccounts 过滤中添加 schedulable 检查 - 确保重置状态后的账号能正确被识别为可用 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/services/claudeAccountService.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/services/claudeAccountService.js b/src/services/claudeAccountService.js index ffd390bd..6a9baacc 100644 --- a/src/services/claudeAccountService.js +++ b/src/services/claudeAccountService.js @@ -630,7 +630,10 @@ class ClaudeAccountService { const accounts = await redis.getAllClaudeAccounts() let activeAccounts = accounts.filter( - (account) => account.isActive === 'true' && account.status !== 'error' + (account) => + account.isActive === 'true' && + account.status !== 'error' && + account.schedulable !== 'false' ) // 如果请求的是 Opus 模型,过滤掉 Pro 和 Free 账号 @@ -717,7 +720,12 @@ class ClaudeAccountService { // 如果API Key绑定了专属账户,优先使用 if (apiKeyData.claudeAccountId) { const boundAccount = await redis.getClaudeAccount(apiKeyData.claudeAccountId) - if (boundAccount && boundAccount.isActive === 'true' && boundAccount.status !== 'error') { + if ( + boundAccount && + boundAccount.isActive === 'true' && + boundAccount.status !== 'error' && + boundAccount.schedulable !== 'false' + ) { logger.info( `🎯 Using bound dedicated account: ${boundAccount.name} (${apiKeyData.claudeAccountId}) for API key ${apiKeyData.name}` ) @@ -736,6 +744,7 @@ class ClaudeAccountService { (account) => account.isActive === 'true' && account.status !== 'error' && + account.schedulable !== 'false' && (account.accountType === 'shared' || !account.accountType) // 兼容旧数据 )