mirror of
https://github.com/earendil-works/pi.git
synced 2026-06-18 15:54:04 +08:00
429 (Too Many Requests) was incorrectly classified as context overflow, triggering compaction instead of retry with backoff. The original logic assumed token-based rate limiting correlates with context overflow, but these are different concepts: - Rate limiting (429): requests/tokens per time period (throughput) - Context overflow: single request exceeds context window (size) Now 429 errors are handled by the existing retry logic with exponential backoff, while 400/413 remain as potential context overflow indicators. fixes #1038