v1.1.37
v1.1.37 — 2026-05-29
🇬🇧 English
Fixed
- Multi-account 429 storms gave up after only the first 3 credentials — The per-request retry budget was hard-capped at
min(credentials × 2, MAX_TOTAL_RETRIES=3), so even with 10 or 50 configured accounts a request hitting 429s would only bounce between the first 3 credentials and never traverse the rest. A newcompute_max_retries(total, available)floors the retry count at the number of available credentials (every usable account gets at least one attempt), keeps the per-credential budget of 2 rounds, and replaces the old hard cap with a runaway-guard ceilingABSOLUTE_MAX_TOTAL_RETRIES=64that only bounds inflation and never pushes the count below the available count.
Added
- Cross-request short cooldown for 429s (stop re-hitting an already-limited credential) — A new
classify_429_cooldownis wired into both the streaming and MCP 429 branches. Ordinary rate-limits and account-level "suspicious activity" throttles (which arrive withreason: nulland none of the traditional rate-limit wording, and were previously never cooled) now place a fixed-duration short cooldown on the credential, soacquire_contextcan skip known-limited accounts with zero round-trips and, when every account is limited, the token manager's all-cooling fast path bails immediately with aRetry-After.INSUFFICIENT_MODEL_CAPACITY(region capacity, unrelated to the account) switches credentials without cooling. The cooldown usesRetry-Afterwhen present, otherwise a default window, always clamped to[60, 300]s, and is always written with an explicit duration viaset_credential_cooldown_with_duration— never through thedefault_durationpath — to avoid the Round 8 exponential 60→90→135s snowball.
🇨🇳 中文
修复
- 多账户 429 风暴下单次请求只重试前 3 个凭据就放弃 — 单次请求的重试预算此前被固定为
min(凭据数 × 2, MAX_TOTAL_RETRIES=3),导致即便配置了 10 或 50 个账户,遇到 429 也只在前 3 个凭据之间打转、无法遍历其余可用号。新增compute_max_retries(total, available):以可用凭据数为遍历下限(每个可用账号至少被尝试一轮),保留每凭据 2 轮的常规预算,并把原来的硬上限改为仅防失控的绝对天花板ABSOLUTE_MAX_TOTAL_RETRIES=64(只约束膨胀,绝不会把次数压到可用数以下)。
新增
- 429 跨请求短冷却(不再反复撞同一个已被限流的凭据) — 新增
classify_429_cooldown,在流式与 MCP 两个 429 分支统一接入。普通限速以及账户级 “suspicious activity” 临时限制(其响应reason: null、不含传统 rate-limit 字样,此前完全不会被冷却)现在会给该凭据打固定时长短冷却:后续acquire_context可零往返直接跳过已知被限流的账号;当所有账号都被限流时,由token_manager的 all-cooling 快路径带Retry-After立即 bail。INSUFFICIENT_MODEL_CAPACITY(region 容量不足,与具体账号无关)只切号、不冷却。冷却时长在有Retry-After时优先采用、否则用默认窗口,统一 clamp 到[60, 300]s,并始终通过set_credential_cooldown_with_duration以显式时长写入——绝不走default_duration路径——以规避 Round 8 的 60→90→135s 指数雪球。
涉及文件 / Files touched: src/kiro/provider.rs
完整变更日志 / Full changelog: CHANGELOG.md