MCPcopy Create free account
hub / github.com/Noumena-Network/code / getNonstreamingFallbackTimeoutMs

Function getNonstreamingFallbackTimeoutMs

src/services/api/claude.ts:834–838  ·  view source on GitHub ↗

* 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

()

Source from the content-addressed store, hash-verified

832 * approaching the API's 10-minute non-streaming boundary.
833 */
834function 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.

Callers 1

Calls 1

isEnvTruthyFunction · 0.90

Tested by

no test coverage detected