fix: 修复无权访问 Claude 服务的问题

This commit is contained in:
shaw
2025-12-26 14:39:29 +08:00
parent dd417e780c
commit 09c9b88c27

View File

@@ -122,16 +122,6 @@ async function handleMessagesRequest(req, res) {
try { try {
const startTime = Date.now() const startTime = Date.now()
// Claude 服务权限校验,阻止未授权的 Key
if (!apiKeyService.hasPermission(req.apiKey.permissions, 'claude')) {
return res.status(403).json({
error: {
type: 'permission_error',
message: '此 API Key 无权访问 Claude 服务'
}
})
}
// 🔄 并发满额重试标志最多重试一次使用req对象存储状态 // 🔄 并发满额重试标志最多重试一次使用req对象存储状态
if (req._concurrencyRetryAttempted === undefined) { if (req._concurrencyRetryAttempted === undefined) {
req._concurrencyRetryAttempted = false req._concurrencyRetryAttempted = false