From 5f60a1ad27f119586c0436883b2f91043e0eaa1f Mon Sep 17 00:00:00 2001 From: erio Date: Sun, 15 Mar 2026 18:44:13 +0800 Subject: [PATCH 1/2] fix(ops): match "insufficient account balance" in error filter The upstream Gemini API returns "Insufficient account balance" which doesn't contain the substring "insufficient balance". Add explicit match for the full phrase to ensure the filter works correctly. --- backend/internal/handler/ops_error_logger.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/backend/internal/handler/ops_error_logger.go b/backend/internal/handler/ops_error_logger.go index 5fedc13926..040276c1e8 100644 --- a/backend/internal/handler/ops_error_logger.go +++ b/backend/internal/handler/ops_error_logger.go @@ -32,8 +32,9 @@ const ( opsErrNoAvailableAccounts = "no available accounts" opsErrInvalidAPIKey = "invalid_api_key" opsErrAPIKeyRequired = "api_key_required" - opsErrInsufficientBalance = "insufficient balance" - opsErrInsufficientQuota = "insufficient_quota" + opsErrInsufficientBalance = "insufficient balance" + opsErrInsufficientAccountBalance = "insufficient account balance" + opsErrInsufficientQuota = "insufficient_quota" // 上游错误码常量 — 错误分类 (normalizeOpsErrorType / classifyOpsPhase / classifyOpsIsBusinessLimited) opsCodeInsufficientBalance = "INSUFFICIENT_BALANCE" @@ -1233,8 +1234,9 @@ func shouldSkipOpsErrorLog(ctx context.Context, ops *service.OpsService, message // Check if insufficient balance errors should be ignored if settings.IgnoreInsufficientBalanceErrors { - if strings.Contains(bodyLower, opsErrInsufficientBalance) || strings.Contains(bodyLower, opsErrInsufficientQuota) || - strings.Contains(msgLower, opsErrInsufficientBalance) { + if strings.Contains(bodyLower, opsErrInsufficientBalance) || strings.Contains(bodyLower, opsErrInsufficientAccountBalance) || + strings.Contains(bodyLower, opsErrInsufficientQuota) || + strings.Contains(msgLower, opsErrInsufficientBalance) || strings.Contains(msgLower, opsErrInsufficientAccountBalance) { return true } } From 3caa91985c4b3e350d60c8316b039989de5c1377 Mon Sep 17 00:00:00 2001 From: erio Date: Sun, 15 Mar 2026 18:44:38 +0800 Subject: [PATCH 2/2] chore: bump version to 0.1.99.5 --- backend/cmd/server/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/cmd/server/VERSION b/backend/cmd/server/VERSION index f5d84b0037..14be300caa 100644 --- a/backend/cmd/server/VERSION +++ b/backend/cmd/server/VERSION @@ -1 +1 @@ -0.1.99.4 +0.1.99.5