Repository navigation
Conversation
Author
|
klepsydra
marked this pull request as draft
September 29, 2026 20:46
- Update _is_short_window_exhausted and _cooldown_minutes_from_short_window to evaluate both short (5h) and weekly quota windows - Update candidate ranking so low/exhausted weekly quota accounts are deprioritized below accounts with available quota - Add regression test for weekly window quota exhaustion failover
klepsydra
force-pushed
the
fix-auto-mode-quota-exhaustion
branch
from
September 30, 2026 00:03
47d8309 to
58fb380
Compare
Owner
|
Reviewed by Codex Thank you for identifying the weekly quota exhaustion gap. This is now implemented on The merged implementation covers the same weekly-window detection and extends it to the current family-aware quota model:
Because PR #6 is now superseded by the implementation on |
Owner
|
Closing as superseded by |
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.
Problem
gemini-weekly(window:weekly) without a 5h rolling window (window:5h),usage_windows["short"]remainsstatus: "unknown"._is_short_window_exhausted()previously only inspected theshortwindow. Becauseshortwasunknown,ensure_active_account()never triggered failover even if the weekly quota was exhausted (0.0% remaining)._best_switch_candidate()did not penalize accounts with exhausted weekly quota, potentially picking exhausted accounts during automatic candidate ranking.Solution
_is_short_window_exhausted()to check bothshortandweeklyquota windows for usage <= threshold._cooldown_minutes_from_short_window()to compute cooldown from the reset timestamp of the exhausted window (short or weekly)._best_switch_candidate()to penalize accounts with low/exhausted weekly quota, prioritizing accounts with available quota.test_weekly_window_exhaustion_triggers_failovertotests/test_manager_regressions.py.