readQuotaRetryHint
readQuotaRetryHint(
error):QuotaRetryHint|null
Defined in: packages/core/src/core/quotaCooldown.ts:132
Read the quota retry hint from an error thrown by the model call.
Returns { waitMs, perMinute: true } if the error represents a per-minute quota 429
from the Gemini API with a retry wait hint.
Returns null if:
- the error is not a 429 quota exhaustion (e.g. 403 balance refusal, 400 invalid request);
- the error is not from Gemini API;
- the quota is per-day (e.g. QuotaFailure quotaId contains
PerDayor lacksPerMinute); - no wait duration could be parsed;
- there is no QuotaFailure and the prose wait is past the bound.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”QuotaRetryHint | null