feat(quota): ✨ implement authoritative local counting and retry tracking #82
+160
−24
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.
Updates the usage tracking logic to handle providers where local counting is more accurate than API returns (specifically Antigravity).
sync_modeinUsageManager(force,if_exhausted,none) to control how API baselines affect local counters.on_retry_attemptcallback inRotatingClientandAntigravityProviderto track internal retries (bare 429s, empty responses) that consume quota.measured_max_requeststracking to dynamically learn the actual request limit of credentials.Linked to Bug: Quota count resets unexpectedly when background refresh syncs with API #75 and fix(usage_manager): 🐛 prevent stale API responses from resetting quota count (#75) #81
Important
Enhance quota tracking and retry handling for Antigravity by implementing local counting, retry tracking, and dynamic request limit learning.
sync_modeinUsageManagerto control API baseline effects on local counters (force,if_exhausted,none).on_retry_attemptcallback inRotatingClientandAntigravityProviderto track retries (bare 429s, empty responses).measured_max_requeststracking to learn actual request limits.increment_request_count()inUsageManagerto track retries not covered byrecord_success/record_failure.update_quota_baseline()inUsageManagerupdated to handlesync_modeand trackmeasured_max_requests.run_background_job()ingemini_credential_manager.pyto disable Antigravity refreshes.This description was created by
for 3137f3b. You can customize this summary. It will automatically update as commits are pushed.