MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getNonstreamingFallbackTimeoutMs

Function getNonstreamingFallbackTimeoutMs

src/services/api/claude.ts:807–811  ·  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

805 * approaching the API's 10-minute non-streaming boundary.
806 */
807function getNonstreamingFallbackTimeoutMs(): number {
808 const override = parseInt(process.env.API_TIMEOUT_MS || '', 10)
809 if (override) return override
810 return isEnvTruthy(process.env.CLAUDE_CODE_REMOTE) ? 120_000 : 300_000
811}
812
813/**
814 * Helper generator for non-streaming API requests.

Callers 1

Calls 1

isEnvTruthyFunction · 0.85

Tested by

no test coverage detected