fix(core): add keepAliveTimeout to no-proxy Agent for connection reuse
Match the proxy path's keepAliveTimeout: 60_000 so TCP connections to local model servers survive between interactive turns (default 4s is too short for 30s–2min prompt intervals).
This commit is contained in:
parent
fe6c8bd5d6
commit
436c41fb19
@ -86,6 +86,7 @@ describe('buildRuntimeFetchOptions (node runtime)', () => {
|
||||
expect(dispatcher?.options).toMatchObject({
|
||||
bodyTimeout: 0,
|
||||
headersTimeout: 0,
|
||||
keepAliveTimeout: 60_000,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -181,6 +181,7 @@ function getOrCreateNoProxyDispatcher(bodyTimeout: number): Dispatcher {
|
||||
const dispatcher = new Agent({
|
||||
bodyTimeout,
|
||||
headersTimeout: 0,
|
||||
keepAliveTimeout: 60_000,
|
||||
});
|
||||
|
||||
noProxyDispatcherCache.set(bodyTimeout, dispatcher);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user