mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
feat: 新增Claude Console账户临时封禁处理和错误消息清理
- 新增 CLAUDE_CONSOLE_BLOCKED_HANDLING_MINUTES 配置项,自动处理账户临时禁用的 400 错误(如 "organization has been disabled"、"too many active sessions" 等)。 - 添加 errorSanitizer 工具模块,自动清理上游错误响应中的供应商特定信息(URL、供应商名称等),避免泄露中转服务商信息。 - 统一调度器现在会主动检查并恢复已过期的封禁账户,确保账户在临时封禁时长结束后可以立即重新使用。
This commit is contained in:
11
.env.example
11
.env.example
@@ -37,6 +37,17 @@ CLAUDE_BETA_HEADER=claude-code-20250219,oauth-2025-04-20,interleaved-thinking-20
|
||||
# 启用529错误处理,0表示禁用,>0表示过载状态持续时间(分钟)
|
||||
CLAUDE_OVERLOAD_HANDLING_MINUTES=0
|
||||
|
||||
# 400错误处理:0表示禁用,>0表示临时禁用时间(分钟)
|
||||
# 只有匹配特定错误模式的 400 才会触发临时禁用
|
||||
# - organization has been disabled
|
||||
# - account has been disabled
|
||||
# - account is disabled
|
||||
# - no account supporting
|
||||
# - account not found
|
||||
# - invalid account
|
||||
# - Too many active sessions
|
||||
CLAUDE_CONSOLE_BLOCKED_HANDLING_MINUTES=10
|
||||
|
||||
# 🌐 代理配置
|
||||
DEFAULT_PROXY_TIMEOUT=600000
|
||||
MAX_PROXY_RETRIES=3
|
||||
|
||||
Reference in New Issue
Block a user