From 31933c8a604826c0639f2ea2eceb4b52fb95f6cf Mon Sep 17 00:00:00 2001 From: song Date: Sat, 17 Jan 2026 10:40:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E6=9C=AA=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E5=AD=97=E6=AE=B5=E4=BF=AE=E5=A4=8D=20lint?= =?UTF-8?q?=20=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/internal/service/antigravity_gateway_service.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/backend/internal/service/antigravity_gateway_service.go b/backend/internal/service/antigravity_gateway_service.go index 7e89c97d..00b89260 100644 --- a/backend/internal/service/antigravity_gateway_service.go +++ b/backend/internal/service/antigravity_gateway_service.go @@ -39,14 +39,12 @@ type antigravityRetryLoopParams struct { body []byte quotaScope AntigravityQuotaScope httpUpstream HTTPUpstream - accountRepo AccountRepository handleError func(ctx context.Context, prefix string, account *Account, statusCode int, headers http.Header, body []byte, quotaScope AntigravityQuotaScope) } // antigravityRetryLoopResult 重试循环的结果 type antigravityRetryLoopResult struct { - resp *http.Response - usedBaseURL string + resp *http.Response } // antigravityRetryLoop 执行带 URL fallback 的重试循环 @@ -144,7 +142,7 @@ urlFallbackLoop: antigravity.DefaultURLAvailability.MarkSuccess(usedBaseURL) } - return &antigravityRetryLoopResult{resp: resp, usedBaseURL: usedBaseURL}, nil + return &antigravityRetryLoopResult{resp: resp}, nil } // shouldRetryAntigravityError 判断是否应该重试 @@ -685,7 +683,6 @@ func (s *AntigravityGatewayService) Forward(ctx context.Context, c *gin.Context, body: geminiBody, quotaScope: quotaScope, httpUpstream: s.httpUpstream, - accountRepo: s.accountRepo, handleError: s.handleUpstreamError, }) if err != nil { @@ -1166,7 +1163,6 @@ func (s *AntigravityGatewayService) ForwardGemini(ctx context.Context, c *gin.Co body: wrappedBody, quotaScope: quotaScope, httpUpstream: s.httpUpstream, - accountRepo: s.accountRepo, handleError: s.handleUpstreamError, }) if err != nil {