From f58c1702cf78c1d3c4dcf6aa1204c8e2f04839cf Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 2 Jun 2026 11:20:27 +0200 Subject: [PATCH] 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 --- packages/coding-agent/CHANGELOG.md | 1 + packages/coding-agent/src/core/sdk.ts | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 92726ebc..a8b4ea02 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -9,6 +9,7 @@ ### Fixed +- Fixed HTTP timeout setting not being respected for non-Codex providers (e.g., llama.cpp via OpenAI-compatible API). The `httpIdleTimeoutMs` setting (set via `/settings` HTTP timeout) now applies as the default SDK request timeout for all providers that support it, not just OpenAI Codex Responses. Disabling the timeout (HTTP timeout = false) now correctly disables SDK timeouts for all supported providers ([#5294](https://github.com/earendil-works/pi/issues/5294)). - Fixed opening and listing very large JSONL session files by reading session entries line-by-line instead of materializing the full file as one string ([#5231](https://github.com/earendil-works/pi/issues/5231)). ## [0.78.0] - 2026-05-29 diff --git a/packages/coding-agent/src/core/sdk.ts b/packages/coding-agent/src/core/sdk.ts index a4401177..417e8a11 100644 --- a/packages/coding-agent/src/core/sdk.ts +++ b/packages/coding-agent/src/core/sdk.ts @@ -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);