fix: add "no parseable body" to CONTEXT_WINDOW_ERROR_MARKERS

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 <crush@charm.land>
This commit is contained in:
TheArchitectit
2026-04-27 15:17:23 -05:00
parent 414a1aca4f
commit 571d3cdc0f

View File

@@ -20,6 +20,7 @@ const CONTEXT_WINDOW_ERROR_MARKERS: &[&str] = &[
"completion tokens", "completion tokens",
"prompt tokens", "prompt tokens",
"request is too large", "request is too large",
"no parseable body",
]; ];
#[derive(Debug)] #[derive(Debug)]