feat(antigravity-core): 添加PROJECT_ID配置支持
refactor(provider-pool-manager): 修改markProviderHealthy调用方式
This commit is contained in:
parent
7420c88a6f
commit
203f0a4e65
2 changed files with 3 additions and 2 deletions
|
|
@ -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] : [
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue