Merge pull request #2461 from wucm667/fix/image-gen-upstream-context-detach

fix(gateway): 修复图片生成上游请求过早取消
This commit is contained in:
Wesley Liddick 2026-05-19 14:14:50 +08:00 committed by GitHub
commit 57603e169e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -592,7 +592,7 @@ func (s *OpenAIGatewayService) forwardOpenAIImagesAPIKey(
setOpsUpstreamRequestBody(c, forwardBody)
}
upstreamCtx, releaseUpstreamCtx := detachStreamUpstreamContext(ctx, parsed.Stream)
upstreamCtx, releaseUpstreamCtx := detachUpstreamContext(ctx)
defer releaseUpstreamCtx()
token, _, err := s.GetAccessToken(upstreamCtx, account)

View File

@ -967,7 +967,7 @@ func (s *OpenAIGatewayService) forwardOpenAIImagesOAuth(
)
}
upstreamCtx, releaseUpstreamCtx := detachStreamUpstreamContext(ctx, parsed.Stream)
upstreamCtx, releaseUpstreamCtx := detachUpstreamContext(ctx)
defer releaseUpstreamCtx()
token, _, err := s.GetAccessToken(upstreamCtx, account)