From 571d3cdc0fa6cab7573b693d5a4a3e8c65686ab7 Mon Sep 17 00:00:00 2001 From: TheArchitectit Date: Mon, 27 Apr 2026 15:17:23 -0500 Subject: [PATCH] fix: add "no parseable body" to CONTEXT_WINDOW_ERROR_MARKERS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some OpenAI-compat backends (e.g. glm-5.1-fast) return 400 with "no parseable body" when the request payload is too large to parse, rather than a proper context_length_exceeded error. Without this marker, is_context_window_error() returns false and the auto-compact retry loop never triggers — the user just sees an opaque 400 error. 💘 Generated with Crush Assisted-by: GLM 5.1 FP8 via Crush --- rust/crates/api/src/error.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rust/crates/api/src/error.rs b/rust/crates/api/src/error.rs index 5373d6f0..aa8e5fc1 100644 --- a/rust/crates/api/src/error.rs +++ b/rust/crates/api/src/error.rs @@ -20,6 +20,7 @@ const CONTEXT_WINDOW_ERROR_MARKERS: &[&str] = &[ "completion tokens", "prompt tokens", "request is too large", + "no parseable body", ]; #[derive(Debug)]