From a25a230e0979142aab37d5ff66a6f2d557780646 Mon Sep 17 00:00:00 2001 From: "zed-zippy[bot]" <234243425+zed-zippy[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 23:53:23 +0000 Subject: [PATCH] zeta: Smaller reject batches (#43942) (cherry-pick to preview) (#43950) Cherry-pick of #43942 to preview ---- 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 Co-authored-by: Agus Zubiaga --- crates/zeta/src/zeta.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/zeta/src/zeta.rs b/crates/zeta/src/zeta.rs index 26a2388a96e4a828fc4c7bd6fe5d3dbb57bfc911..bdbd2b730714daee7bfad3cd0926ac7e01471b30 100644 --- a/crates/zeta/src/zeta.rs +++ b/crates/zeta/src/zeta.rs @@ -941,7 +941,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 DISCARD_COMPLETIONS_DEBOUNCE: Duration = Duration::from_secs(15);