Repository navigation
feat(gemini): park 429-exhausted API keys + orange on-hold badge - #4348
Open
scottchristian wants to merge 5 commits into
Open
scottchristian wants to merge 5 commits into
scottchristian wants to merge 5 commits into
Conversation
…literals Review follow-ups: - EditConnectionModal: read the lock clock from state instead of Date.now() during render (react-hooks/purity); the modal now re-reads each second so a hold that lapses while open is reflected. - OnHoldBadge: single updater in the effect body instead of a bare setState branch (react-hooks/set-state-in-effect). - CHANGELOG: add an "# Unreleased" section, matching how other contributors land entries between releases (v0.5.86 is already tagged). - i18n: add "on hold", "all models", and the cooldown-expired notice to all 33 literal files. Verified: full `eslint .` output is now byte-identical to master (341 problems, 139 errors), and the test suite shows 0 new failures vs master (+29 passing).
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.
Free-tier Gemini keys that hit 429s were retried with blind exponential backoff, burning through every key in seconds. This change:
RetryInfo.retryDelay/Please retry in Xsfrom Gemini 429s into an exact per-key cooldown (modelLock___all, so rotation skips the key entirely — chat, native v1beta, TTS/STT paths included)PerDayviolations inQuotaFailure) and hintless 429s to a random 1-3h park, since the seconds-scale hint never clears thoseon hold · 22sbadge with live countdown (was misleading greenactive), plusN On holdon overview/media-provider cards, and hold state (return time, parked models, last error) in the edit modalVerified live against 8 real free-tier keys: one request parked 7 exhausted keys (64-172 min each) and served via the healthy one. 37 new/related unit tests pass (
gemini-429-cooldown,connection-status-badge); the 2 failing suites (gemini-native-endpoint,auth-status) fail identically on unmodified main due to missingundiciintests/node_modules— pre-existing, unrelated.