Files
claude-relay-service/src/services
Edric Li 4c2660a2d3 fix: 修复专属账号停止调度后仍能使用的问题
- 在 selectAccountForApiKey 方法中为所有专属账号类型添加 schedulable 检查
- 在 _getAllAvailableAccounts 方法中为所有专属账号类型添加 schedulable 检查
- 改进日志输出,显示账号不可用的具体原因(isActive、status、schedulable 状态)

问题描述:
当 Claude Console/OAuth/Bedrock 账号设置为专属账号并停止调度(schedulable=false)后,
系统仍然会使用该账号,没有正确回退到账号池。

修复内容:
1. Claude OAuth 账号:添加 this._isSchedulable(boundAccount.schedulable) 检查
2. Claude Console 账号:添加 this._isSchedulable(boundConsoleAccount.schedulable) 检查
3. Bedrock 账号:添加 this._isSchedulable(boundBedrockAccountResult.data.schedulable) 检查

兼容性:
_isSchedulable 方法已处理向后兼容,当 schedulable 字段为 undefined/null 时默认返回 true

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 02:33:50 +08:00
..
2025-09-08 16:14:54 +08:00