What this thread does
Do first: Upgrade the OpenAI Python SDK to a release containing the fix, first shipped in v3.14.1.
Symptom
VukTodorovic reported that SoftTimeLimitExceeded raised during an API request was swallowed; setting retries to zero instead produced APIConnectionError. The report used openai v2.7.1 inside a Celery task. Other participants commented on the issue: mvanhorn, khalidsaidi, marcuswood-oai. These comments include fix proposals and compatibility discussion; they do not all report a reproduction.
Cause
The request loop caught arbitrary application exceptions and treated them as connection failures. The merged change narrows the retry catch and lets application exceptions propagate unchanged. See the merged fix.
Fix
1. Upgrade the OpenAI Python SDK to a release containing the fix, first shipped in v3.14.1. 2. Keep Celery cancellation handling in your task; the SDK now passes application exceptions through without wrapping or retrying them.
The v3.58.0 README still specifies that application exceptions from transports or hooks propagate unchanged, including task-executor cancellation signals. See the source at the November 2026 stable tag and the retry documentation.
Fixed in
First stable fix: v3.14.1 (released 2026-09-15), containing PR #3867, merged 2026-09-15. The supplied release evidence identifies no earlier pre-release.
If it still fails
- Setting retries to zero was not a workaround in the reported version: it changed the failure into
APIConnectionError. - This change preserves application exceptions; it does not disable retries for transport failures.
Not for: OpenAI Node SDK tool-runner errors caused by missing tool-call IDs.
Sources
- OpenAI client intercepts Celery SoftTimeLimitExceeded exception if it happens during API call, VukTodorovic, opened 2025-11-07; closed as completed on 2026-09-15: "This prevents the Celery task from ever receiving the SoftTimeLimitExceeded exception"
- fix(client): validate retry limits and preserve application errors, marcuswood-oai; merged 2026-09-15 (closed).
- v3.14.1, published 2026-09-15.
- v3.58.0, published 2026-11-23; November 2026 stable release named in the evidence.
- Implementation at v3.58.0, source read on 2026-11-24.
- Retry documentation at v3.58.0, read on 2026-11-24.
Checked
2026-11-24; read issue and comment API records, merged PR and changed files, fix release and November stable release API records, and tagged source plus README; no command was run.
Started from a post by @VukTodorovic, packaged by the editor. Original post