Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
20283bb5
Unverified
Commit
20283bb5
authored
Feb 07, 2026
by
Wesley Liddick
Committed by
GitHub
Feb 07, 2026
Browse files
Merge pull request #507 from touwaeriol/pr/fix-429-fallback-default
fix(antigravity): reduce 429 fallback cooldown from 5min to 30s
parents
515dbf2c
8917afab
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/internal/service/antigravity_gateway_service.go
View file @
20283bb5
...
@@ -2048,11 +2048,12 @@ func (s *AntigravityGatewayService) handleUpstreamError(ctx context.Context, pre
...
@@ -2048,11 +2048,12 @@ func (s *AntigravityGatewayService) handleUpstreamError(ctx context.Context, pre
resetAt
:=
ParseGeminiRateLimitResetTime
(
body
)
resetAt
:=
ParseGeminiRateLimitResetTime
(
body
)
if
resetAt
==
nil
{
if
resetAt
==
nil
{
// 解析失败:使用配置的 fallback 时间,直接限流整个账户
// 解析失败:使用配置的 fallback 时间,直接限流整个账户
fallbackMinutes
:=
5
// 默认 30 秒,可通过配置覆盖(配置单位为分钟)
fallbackSeconds
:=
30
if
s
.
settingService
!=
nil
&&
s
.
settingService
.
cfg
!=
nil
&&
s
.
settingService
.
cfg
.
Gateway
.
AntigravityFallbackCooldownMinutes
>
0
{
if
s
.
settingService
!=
nil
&&
s
.
settingService
.
cfg
!=
nil
&&
s
.
settingService
.
cfg
.
Gateway
.
AntigravityFallbackCooldownMinutes
>
0
{
fallback
Minute
s
=
s
.
settingService
.
cfg
.
Gateway
.
AntigravityFallbackCooldownMinutes
fallback
Second
s
=
s
.
settingService
.
cfg
.
Gateway
.
AntigravityFallbackCooldownMinutes
*
60
}
}
defaultDur
:=
time
.
Duration
(
fallback
Minute
s
)
*
time
.
Minute
defaultDur
:=
time
.
Duration
(
fallback
Second
s
)
*
time
.
Second
if
fallbackDur
,
ok
:=
antigravityFallbackCooldownSeconds
();
ok
{
if
fallbackDur
,
ok
:=
antigravityFallbackCooldownSeconds
();
ok
{
defaultDur
=
fallbackDur
defaultDur
=
fallbackDur
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment