feat: track thread ids and retry stream disconnects

This commit is contained in:
2026-06-30 11:25:36 +08:00
parent ec1f8ceb16
commit a642022066
7 changed files with 244 additions and 19 deletions
+4 -1
View File
@@ -200,7 +200,10 @@ function buildProfileConfig({ profileName, profileEnv, existingGatewayConfig, pr
),
retryable_error_messages: normalizePhraseArray(
profileEnv.CODEX_RETRY_GATEWAY_RETRYABLE_ERROR_MESSAGES || existingGatewayConfig?.retryable_error_messages,
["Selected model is at capacity. Please try a different model."],
[
"Selected model is at capacity. Please try a different model.",
"stream disconnected before completion: Concurrency limit exceeded for account, please retry later",
],
),
upstream_fetch_retry_attempts: profileEnv.CODEX_RETRY_GATEWAY_UPSTREAM_FETCH_RETRY_ATTEMPTS
? Number.parseInt(`${profileEnv.CODEX_RETRY_GATEWAY_UPSTREAM_FETCH_RETRY_ATTEMPTS}`, 10)