From 17c0ee385985073fb4a35a10ad1fb39eadb08959 Mon Sep 17 00:00:00 2001 From: IanShaw <131567472+IanShaw027@users.noreply.github.com> Date: Thu, 20 Aug 2026 06:08:34 -0700 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=20Grok=20compaction=20422=20?= =?UTF-8?q?=E9=87=8D=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/internal/service/openai_gateway_grok.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/internal/service/openai_gateway_grok.go b/backend/internal/service/openai_gateway_grok.go index 132f7b3159..6ad03cc253 100644 --- a/backend/internal/service/openai_gateway_grok.go +++ b/backend/internal/service/openai_gateway_grok.go @@ -119,7 +119,7 @@ func (s *OpenAIGatewayService) forwardGrokResponses( // xAI can reject encrypted reasoning copied from a response produced under // another account or cache identity. Retry once with the same routing and // credential after removing only the rejected encrypted reasoning payload. - if attempt > 0 || resp.StatusCode != http.StatusBadRequest { + if attempt > 0 || (resp.StatusCode != http.StatusBadRequest && resp.StatusCode != http.StatusUnprocessableEntity) { break } respBody := s.readUpstreamErrorBody(resp)