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-09 12:00:03 +08:00
2026-02-10 11:42:39 +08:00
2026-02-14 00:21:56 +08:00
2026-02-10 11:42:39 +08:00
2026-02-06 07:14:46 +08:00
2026-01-11 23:00:31 +08:00
2026-01-11 23:49:03 +08:00
2026-02-13 20:12:50 +08:00
2026-02-06 07:41:23 +08:00
2026-02-09 07:02:12 +08:00
2026-02-09 07:02:12 +08:00
2026-01-05 13:54:43 +08:00