Resets the global quota exceeded flag.
(cls)
| 143 | |
| 144 | @classmethod |
| 145 | def reset_quota_status(cls): |
| 146 | """ |
| 147 | Resets the global quota exceeded flag. |
| 148 | """ |
| 149 | cls.IS_QUOTA_EXCEEDED = False |
| 150 | cls.NEEDS_ROTATION = False # Reset soft flag too |
| 151 | cls.QUOTA_EXCEEDED_TIMESTAMP = 0.0 |
| 152 | cls.last_error_type = None |
| 153 | cls.QUOTA_EXCEEDED_EVENT.clear() |
| 154 | |
| 155 | # [QUOTA-02] Reset model usage stats |
| 156 | cls.current_profile_model_usage.clear() |
| 157 | cls.current_profile_exhausted_models.clear() |
| 158 | |
| 159 | logger.info("✅ GLOBAL ALERT: Quota status manually reset.") |
| 160 | |
| 161 | @classmethod |
| 162 | def increment_token_count(cls, count: int, model_id: str = "default"): |