fix: apply httpIdleTimeoutMs to all providers, not just Codex Responses

The HTTP timeout setting (httpIdleTimeoutMs) was only used as a fallback for the
openai-codex-responses API. For other providers like openai-completions
(llama.cpp), the SDK default timeout (10 min) was used instead, ignoring the
user's disabled timeout setting.

Now httpIdleTimeoutMs applies universally as the default SDK request timeout
for all providers that support timeoutMs. Setting HTTP timeout = false (0)
correctly disables SDK timeouts across the board.

closes #5294
This commit is contained in:
Mario Zechner
2026-06-02 11:20:27 +02:00
parent afcf9ff0dc
commit f58c1702cf
2 changed files with 2 additions and 3 deletions

View File

@@ -343,9 +343,7 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
}
const providerRetrySettings = settingsManager.getProviderRetrySettings();
const timeoutMs =
options?.timeoutMs ??
providerRetrySettings.timeoutMs ??
(model.api === "openai-codex-responses" ? settingsManager.getHttpIdleTimeoutMs() : undefined);
options?.timeoutMs ?? providerRetrySettings.timeoutMs ?? settingsManager.getHttpIdleTimeoutMs();
const websocketConnectTimeoutMs =
options?.websocketConnectTimeoutMs ?? settingsManager.getWebSocketConnectTimeoutMs();
const attributionHeaders = getAttributionHeaders(model, settingsManager, options?.sessionId);