mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-14 12:02:27 +08:00
支持 Grok compaction 422 重试
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user