mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-07 15:38:22 +08:00
调整 Grok 媒体超时与重试语义
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user