调整 Grok 媒体超时与重试语义

This commit is contained in:
IanShaw
2026-08-20 02:39:13 -07:00
parent 61c2f5ad28
commit e85348be80
+1 -1
View File
@@ -658,7 +658,6 @@ func (s *OpenAIGatewayService) ForwardGrokMedia(
}
upstreamCtx, releaseUpstreamCtx := detachUpstreamContext(ctx)
defer releaseUpstreamCtx()
upstreamCtx = WithHTTPUpstreamProfile(upstreamCtx, HTTPUpstreamProfileGrok)
upstreamReq, err := http.NewRequestWithContext(upstreamCtx, endpoint.httpMethod(), targetURL, bodyReader)
if err != nil {
return nil, err
@@ -1295,6 +1294,7 @@ func (s *OpenAIGatewayService) handleGrokMediaErrorResponse(
ResponseBody: body,
ResponseHeaders: resp.Header.Clone(),
RetryableOnSameAccount: retryable,
RequestScopedTransient: retryable && resp.StatusCode == http.StatusTooManyRequests,
SameAccountRetryDelay: retryDelay,
SameAccountRetryDeadline: retryDeadline,
}