refactor(core): restructure refreshAuth to await experiments before client init

This commit is contained in:
Yuna Seol
2026-04-01 14:20:32 -04:00
parent f9006c4eff
commit ef0f18e429
-8
View File
@@ -1593,14 +1593,6 @@ export class Config implements McpContext, AgentLoopContext {
this.setModel(DEFAULT_GEMINI_MODEL_AUTO);
}
// Fetch admin controls
const experiments = await this.experimentsPromise;
const requestTimeoutMs = this.getRequestTimeoutMs();
if (requestTimeoutMs !== undefined) {
updateGlobalFetchTimeouts(requestTimeoutMs);
}
const adminControlsEnabled =
experiments?.flags[ExperimentFlags.ENABLE_ADMIN_CONTROLS]?.boolValue ??
false;