You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pacing queue overload surfaces as 502 upstream_error instead of retryable 429 on fetchResponse and rebuildAndRefetch paths #1790
waitForProviderRequestSlot throws RequestPacingQueueOverloadError when a provider's request-pacing queue is full. The runTurn path in src/server/responses/core.ts (around line 3247) translates that error into a retryable 429 rate_limit_error event, but the generic transport catches around the initial fetchResponse dispatch (around lines 3451-3480) and rebuildAndRefetch (around lines 3544-3565) convert every error into 502 upstream_error. Under pacing-queue pressure, requests dispatched through those paths receive a 502 instead of the retryable-429 contract used elsewhere for the same condition.
Additionally, noteAttemptSend runs before waitForProviderRequestSlot admits the request on the fetchResponse branch (around line 3457), so overload-rejected requests still inflate the attempt send count.
Reproduction
Found by code review while working on #1743; not yet reproduced at runtime. Code-path walkthrough against dev @ 4b950101a1116d8bac4e479cb2dceca3bb80370e:
Configure a provider with request pacing where the queue capacity is small relative to the burst.
Send a burst of /v1/responses requests routed through a provider adapter that uses fetchResponse, or trigger the rebuild/refetch retry path.
When the pacing queue is full, waitForProviderRequestSlot throws RequestPacingQueueOverloadError (src/server/responses/core.ts:3451 or :3545).
The surrounding catch converts it to 502 upstream_error (lines ~3473-3480 / ~3560-3565) instead of the retryable 429 shape the runTurn path produces at ~3247.
Expected: the same retryable-429 mapping as the runTurn path, with noteAttemptSend moved after successful pacing admission so rejected requests do not count as sends.
Version
dev @ 4b950101a1116d8bac4e479cb2dceca3bb80370e (pre-existing path; unchanged by #1743)
Operating system
Linux (Debian 13); the code path is platform-independent
Provider and model
Any forward-auth Responses provider with request pacing configured
Logs or error output
No response
Screenshots and supporting files
No response
Redacted configuration
No response
Checks
I searched existing issues and documentation.
I removed secrets, tokens, account details, request credentials, and personal data.
Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.
Create Plan
🧪 Issue enrichment is currently in open beta.
To disable automatic issue enrichment, add the following to your .coderabbit.yaml:
issue_enrichment:
auto_enrich:
enabled: false
💬 Have feedback or questions? Drop into our discord!
Activity
coderabbitai commentedon Aug 15, 2026
🔗 Related PRs
#463 - fix(proxy): stop empty 503 bodies becoming Codex Unknown error (
#452) [merged]#599 - fix: scope Spark cooldowns to its native quota [merged]
#749 - fix(responses): reject expired forward continuations [merged]
#865 - feat(proxy): opt-in same-target 429 wait-and-retry before key failover (
#487) [merged]#1752 - feat: land four rebuilt heavy drafts (service tiers, request pacing, native chat, empty-completion guard) [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
Wibias commentedon Aug 16, 2026
Fixed on dev.