mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-04-03 06:52:13 +08:00
当账号仅触发 5h 窗口限流时,旧逻辑从聚合头 anthropic-ratelimit-unified-reset 读取重置时间,该值为所有窗口的 最大值(即 7d 重置时间),导致账号被标记为不可调度约 6 天。 新增 calculateAnthropic429ResetTime 函数,解析 Anthropic 的 per-window 头(5h-utilization/reset、7d-utilization/reset、 surpassed-threshold),判断实际触发的窗口并使用对应的重置时间: - 仅 5h 超标 → 使用 5h-reset(约 5 小时) - 仅 7d 超标 → 使用 7d-reset - 两者均超标 → 使用 7d-reset(较长冷却) - per-window 头不存在 → 回退到聚合头(向后兼容)
6.6 KiB
6.6 KiB