mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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}` : ''}`
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user