Agent Provider Depot / Error Rescue Index (28 Traps) / streaming-sse-econnreset
provider_outagetrapId: trap-streaming-sse-econnreset · asOf: 2026-10-28
Streaming SSE Mid-Turn Disconnect (ECONNRESET / ETIMEDOUT / ERR_STREAM_PREMATURE_CLOSE)
Long reasoning turns (>60s TTFT on reasoning models) get dropped by NAT gateways, serverless idle timeouts, or upstream TCP resets without keep-alive heartbeats.
1. Immediate Code & SKU Fix
Replace With SKU:
cloudflare-ai-gateway + stream keepalive retry wrapperInstall Command:
npm install openai@latestRequired Env Vars:
CF_AIG_TOKENconst client = new OpenAI({ timeout: 180_000, maxRetries: 3 }); // Enable SSE stream + idempotent request-id header2. Verified Hot-Swap Fallback Route
JTBD: llm-gateway
Primary: cloudflare-ai-gateway → Fallback: openrouter
liveHealth: operational · autoActOk: true
Compliance blocks Anthropic
Matched Error String Signatures (5)
ECONNRESETETIMEDOUTERR_STREAM_PREMATURE_CLOSEUND_ERR_SOCKETsocket hang upcurl -s "https://getagentdepot.com/api/rescue?q=ECONNRESET"
Browse All 28 Agent Runtime Rescue Cards
deprecated-claude-3-5-sonnetdeprecated-openai-gpt4deprecated-ada-002deprecated-google-generative-aiwrong-package-r2wrong-package-pinecone-clientwrong-package-mailgun-jsrate-limit-429provider-outage-529payment-required-402waf-bot-blocksmtp-port-25-timeoutlambda-15m-timeoutvercel-4-5mb-payloadsqlite-busyneon-cold-startsmithery-connect-shutdowngemini-preview-shutdown-2026-11-17openai-tts-1-shutdown-2027-01-06openai-insufficient-quotacontext-length-exceeded-413streaming-sse-econnresetcloudflare-1015-rate-limitvector-dimension-mismatchmcp-jsonrpc-method-not-foundsandbox-oom-exit-137postgres-too-many-connectionsheadless-browser-executable-missing