📱 Client Type
Other
💻 Operating System
Other
📦 Deployment Platform
Other
📌 Version
latest (static analysis — not version-specific)
🌐 Browser
Chrome, Other
🐛 What happened?
executeWithRetry in packages/model-runtime/src/providers/githubCopilot/index.ts reads retry-after correctly but caps it at 10 seconds:
Math.min(retryAfter, 10_000)
A retry-after of 3 hours (quota exhaustion) gets truncated to 10 seconds and retried 3 times instead of surfacing
immediately as unrecoverable.
📷 How to reproduce it?
Static analysis finding in src/providers/githubCopilot/index.ts
Trigger a quota exhaustion 429 with retry-after > 300s.
Observe that executeWithRetry caps the delay at 10s and retries MAX_RATE_LIMIT_RETRIES times instead of surfacing.
🚦 What it should be?
retry-after above a threshold should surface immediately as quota exhaustion, not consume retry attempts.
Suggested fix:
const STOP_THRESHOLD_MS = 5 * 60 * 1000
if (retryAfter && retryAfter > STOP_THRESHOLD_MS) {
throw this.mapError(error)
}
📝 Additional Information
Documented across production systems:
github.com/SirBrenton/pitstop-truth
🛠️ Willing to Submit a PR?
Yes, I am willing to submit a PR
✅ Validations
📱 Client Type
Other
💻 Operating System
Other
📦 Deployment Platform
Other
📌 Version
latest (static analysis — not version-specific)
🌐 Browser
Chrome, Other
🐛 What happened?
executeWithRetry in packages/model-runtime/src/providers/githubCopilot/index.ts reads retry-after correctly but caps it at 10 seconds:
Math.min(retryAfter, 10_000)
A retry-after of 3 hours (quota exhaustion) gets truncated to 10 seconds and retried 3 times instead of surfacing
immediately as unrecoverable.
📷 How to reproduce it?
Static analysis finding in src/providers/githubCopilot/index.ts
Trigger a quota exhaustion 429 with retry-after > 300s.
Observe that executeWithRetry caps the delay at 10s and retries MAX_RATE_LIMIT_RETRIES times instead of surfacing.
🚦 What it should be?
retry-after above a threshold should surface immediately as quota exhaustion, not consume retry attempts.
Suggested fix:
const STOP_THRESHOLD_MS = 5 * 60 * 1000
if (retryAfter && retryAfter > STOP_THRESHOLD_MS) {
throw this.mapError(error)
}
📝 Additional Information
Documented across production systems:
github.com/SirBrenton/pitstop-truth
🛠️ Willing to Submit a PR?
Yes, I am willing to submit a PR
✅ Validations