pub async fn record_rate_limit(
agent_name: &str,
model: Option<&str>,
error_message: &str,
)Expand description
Record a rate-limit event for an agent+model.
If the error message advertises a relative usage window (e.g. “5-hour usage limit”), the cooldown is applied to the specific model for that window length. The quota is model-scoped, so the whole agent is not cooled. If no window is detected, fall back to the generic agent+model exponential backoff path.