shaw
e681431454
fix: Anthropic 429 限流使用精确的窗口重置时间而非聚合最大值
当账号仅触发 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 头不存在 → 回退到聚合头(向后兼容)
2026-02-14 00:21:56 +08:00
..
2026-02-05 12:49:43 +08:00
2026-02-07 12:31:10 +08:00
2026-02-12 03:47:06 +08:00
2026-02-02 22:13:50 +08:00
2026-02-10 11:42:39 +08:00
2026-02-11 20:00:22 +08:00
2026-02-12 03:47:06 +08:00
2026-02-12 03:47:06 +08:00
2026-02-14 00:21:56 +08:00
2026-02-02 22:13:50 +08:00
2026-02-02 22:13:50 +08:00
2026-01-16 17:05:49 +08:00