mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-24 22:12:34 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c5a74eb5d | ||
|
|
09c9b88c27 |
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user