From 203f0a4e6578631f3186746b232f06d451bd6896 Mon Sep 17 00:00:00 2001 From: hex2077 Date: Mon, 1 Dec 2025 13:20:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(antigravity-core):=20=E6=B7=BB=E5=8A=A0PRO?= =?UTF-8?q?JECT=5FID=E9=85=8D=E7=BD=AE=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refactor(provider-pool-manager): 修改markProviderHealthy调用方式 --- src/gemini/antigravity-core.js | 1 + src/provider-pool-manager.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gemini/antigravity-core.js b/src/gemini/antigravity-core.js index 93f317e..04db375 100644 --- a/src/gemini/antigravity-core.js +++ b/src/gemini/antigravity-core.js @@ -219,6 +219,7 @@ export class AntigravityApiService { this.oauthCredsFilePath = config.ANTIGRAVITY_OAUTH_CREDS_FILE_PATH; this.baseURL = ANTIGRAVITY_BASE_URL_DAILY; // 使用通用 GEMINI_BASE_URL 配置 this.userAgent = DEFAULT_USER_AGENT; // 支持通用 USER_AGENT 配置 + this.projectId = config.PROJECT_ID; // 多环境降级顺序 this.baseURLs = this.baseURL ? [this.baseURL] : [ diff --git a/src/provider-pool-manager.js b/src/provider-pool-manager.js index de34726..554ae16 100644 --- a/src/provider-pool-manager.js +++ b/src/provider-pool-manager.js @@ -305,12 +305,12 @@ export class ProviderPoolManager { if (!providerStatus.config.isHealthy) { // Provider was unhealthy but is now healthy // 恢复健康时不重置使用计数,保持原有值 - this.markProviderHealthy(providerType, providerConfig); + this.markProviderHealthy(providerType, providerConfig, true); this._log('info', `Health check for ${providerConfig.uuid} (${providerType}): Marked Healthy (actual check)`); } else { // Provider was already healthy and still is // 只在初始化时重置使用计数 - this.markProviderHealthy(providerType, providerConfig); + this.markProviderHealthy(providerType, providerConfig, true); this._log('debug', `Health check for ${providerConfig.uuid} (${providerType}): Still Healthy`); } } else {