zeta: Smaller reject batches (#43942)

We were allowing the client to build up to
`MAX_EDIT_PREDICTION_REJECTIONS_PER_REQUEST`. We'll now attempt to flush
the rejections when we reach half max.

Release Notes:

- N/A
This commit is contained in:
Agus Zubiaga authored and GitHub committed 2025-12-01 21:10:13 +00:00
1 parent 70cda62e04
commit bb6cb4e0b3
1 file changed
+1 -1
+1 -1
View File
@@ -993,7 +993,7 @@ impl Zeta {
});
let reached_request_limit =
self.rejected_predictions.len() >= MAX_EDIT_PREDICTION_REJECTIONS_PER_REQUEST;
self.rejected_predictions.len() >= MAX_EDIT_PREDICTION_REJECTIONS_PER_REQUEST / 2;
let reject_tx = self.reject_predictions_tx.clone();
self.reject_predictions_debounce_task = Some(cx.spawn(async move |_this, cx| {
const REJECT_REQUEST_DEBOUNCE: Duration = Duration::from_secs(15);