fix(server): honor Retry-After on 429 + abort cross-account auto-continuation#6
Open
danscMax wants to merge 1 commit into
Open
fix(server): honor Retry-After on 429 + abort cross-account auto-continuation#6danscMax wants to merge 1 commit into
danscMax wants to merge 1 commit into
Conversation
…ntinuation - markAccountFailure now honors a Retry-After header (delta-seconds or HTTP-date) on HTTP 429, falling back to the env-configured fixed cooldown when the header is absent or unparseable - auto-continuation aborts when account rotation moved to a different account whose chat_session lacks prior context (continuation would be irrelevant)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two small, independent resilience fixes for rate-limit handling and auto-continuation.
#16 — honor Retry-After on 429
markAccountFailurecurrently applies a fixed cooldown on 429 and ignores the server'sRetry-After. This readsRetry-After(both delta-seconds and HTTP-date forms) and uses it for the cooldown when present, falling back to the existingDEEPSEEK_ACCOUNT_COOLDOWN_MSotherwise. The override is gated to 429 only.#20 — abort cross-account auto-continuation
Auto-continuation calls
askDeepSeekStream('continue'). If the account rotated mid-stream (e.g. the original hit a cooldown), the continuation runs on a different account whosechat_sessionhas no prior context — appending irrelevant text to the response. This detects the account switch and stops continuation instead.Notes
askDeepSeekStreamnow also returnsaccount(additive; existing destructures unaffected)./health.