File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ import OpenAI from "openai";
55import { Agent , fetch as undiciFetch } from "undici" ;
66import { resolveCurrentSettings } from "../ui/App" ;
77
8- // Custom undici Agent with a 60 -second keepAlive timeout. The default
8+ // Custom undici Agent with a 180 -second keepAlive timeout. The default
99// global fetch (undici) only keeps connections alive for 4 seconds, which
1010// is too short for a CLI where the user may spend 10–30 seconds reading
1111// output between prompts. By passing a dedicated Agent to undiciFetch we
12- // keep connections reusable for a full minute after the last request.
13- const keepAliveAgent = new Agent ( { keepAliveTimeout : 60_000 } ) ;
12+ // keep connections reusable for three minutes after the last request.
13+ const keepAliveAgent = new Agent ( { keepAliveTimeout : 180_000 } ) ;
1414
1515// Module-level cache for the OpenAI client instance. The client itself is
1616// a stateless fetch wrapper, so it is safe to share across calls as long as
You can’t perform that action at this time.
0 commit comments