feat: 新增Claude Console账户临时封禁处理和错误消息清理

- 新增 CLAUDE_CONSOLE_BLOCKED_HANDLING_MINUTES 配置项,自动处理账户临时禁用的 400 错误(如 "organization has been disabled"、"too many active sessions" 等)。
  - 添加 errorSanitizer 工具模块,自动清理上游错误响应中的供应商特定信息(URL、供应商名称等),避免泄露中转服务商信息。
  - 统一调度器现在会主动检查并恢复已过期的封禁账户,确保账户在临时封禁时长结束后可以立即重新使用。
This commit is contained in:
sususu
2025-10-17 15:27:47 +08:00
parent f6eb077d82
commit b0917b75a4
6 changed files with 548 additions and 59 deletions

View File

@@ -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