refactor: address Copilot review feedback

- Import isOpus45OrNewer from modelHelper instead of duplicating code
- Remove invalid 'claude_free' check (only 'free' is used in practice)
This commit is contained in:
lusipad
2025-12-05 07:56:53 +08:00
parent dc868522cf
commit 12cb841a64
3 changed files with 4 additions and 90 deletions

View File

@@ -863,7 +863,7 @@ class ClaudeAccountService {
const info = JSON.parse(account.subscriptionInfo)
// Free 账号不支持任何 Opus 模型
if (info.accountType === 'claude_free' || info.accountType === 'free') {
if (info.accountType === 'free') {
return false
}
@@ -992,7 +992,7 @@ class ClaudeAccountService {
const info = JSON.parse(account.subscriptionInfo)
// Free 账号不支持任何 Opus 模型
if (info.accountType === 'claude_free' || info.accountType === 'free') {
if (info.accountType === 'free') {
return false
}

View File

@@ -58,7 +58,7 @@ class UnifiedClaudeScheduler {
: account.subscriptionInfo
// Free 账号不支持任何 Opus 模型
if (info.accountType === 'claude_free' || info.accountType === 'free') {
if (info.accountType === 'free') {
logger.info(
`🚫 Claude account ${account.name} (Free) does not support Opus model${context ? ` ${context}` : ''}`
)