* Per-attempt timeout for non-streaming fallback requests, in milliseconds. * Reads API_TIMEOUT_MS when set so slow backends and the streaming path * share the same ceiling. * * Remote sessions default to 120s to stay under CCR's container idle-kill * (~5min) so a hung fallback to a wedged back
()
| 832 | * approaching the API's 10-minute non-streaming boundary. |
| 833 | */ |
| 834 | function getNonstreamingFallbackTimeoutMs(): number { |
| 835 | const override = parseInt(process.env.API_TIMEOUT_MS || '', 10) |
| 836 | if (override) return override |
| 837 | return isEnvTruthy(process.env.CLAUDE_CODE_REMOTE) ? 120_000 : 300_000 |
| 838 | } |
| 839 | |
| 840 | /** |
| 841 | * Helper generator for non-streaming API requests. |
no test coverage detected