diff --git a/src/server/services/modelService.ts b/src/server/services/modelService.ts index fe5a3bc..4bc094c 100644 --- a/src/server/services/modelService.ts +++ b/src/server/services/modelService.ts @@ -496,6 +496,7 @@ export async function refreshModelsForAccount(accountId: number): Promise discoverCodexModelsFromCloud({ site, account }), + () => withAccountProxyOverride(accountProxyUrl, + () => discoverCodexModelsFromCloud({ site, account })), MODEL_DISCOVERY_TIMEOUT_MS, `codex model discovery timeout (${Math.round(MODEL_DISCOVERY_TIMEOUT_MS / 1000)}s)`, ); @@ -595,7 +597,8 @@ export async function refreshModelsForAccount(accountId: number): Promise validateClaudeOauthConnection({ site, account }), + () => withAccountProxyOverride(accountProxyUrl, + () => validateClaudeOauthConnection({ site, account })), MODEL_DISCOVERY_TIMEOUT_MS, `claude oauth validation timeout (${Math.round(MODEL_DISCOVERY_TIMEOUT_MS / 1000)}s)`, ); @@ -661,7 +664,8 @@ export async function refreshModelsForAccount(accountId: number): Promise validateGeminiCliOauthConnection({ account }), + () => withAccountProxyOverride(accountProxyUrl, + () => validateGeminiCliOauthConnection({ account })), MODEL_DISCOVERY_TIMEOUT_MS, `gemini cli oauth validation timeout (${Math.round(MODEL_DISCOVERY_TIMEOUT_MS / 1000)}s)`, ); @@ -727,7 +731,8 @@ export async function refreshModelsForAccount(accountId: number): Promise discoverAntigravityModelsFromCloud({ site, account }), + () => withAccountProxyOverride(accountProxyUrl, + () => discoverAntigravityModelsFromCloud({ site, account })), MODEL_DISCOVERY_TIMEOUT_MS, `antigravity model discovery timeout (${Math.round(MODEL_DISCOVERY_TIMEOUT_MS / 1000)}s)`, ); @@ -797,7 +802,6 @@ export async function refreshModelsForAccount(accountId: number): Promise