openai / openai/openai-python

Improve behaviour for read timeouts

Open
#809 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement sdk
Dominant language
Python
Stars
31.6k
Forks
5.7k
Avg merge
1d 6h
Merged PRs (30d)
96

Description

Confirm this is an issue with the Python library and not an underlying OpenAI API
  • This is an issue with the Python library
Describe the bug

The fix for https://github.com/openai/openai-python/issues/769 involved adding retries for httpx.ReadTimeout exceptions which works but as the default timeout is 10 minutes, this can quickly rack up time spent in API requests.

We should figure out a better solution here.

To Reproduce

N/A

Code snippets

No response

OS

N/A

Python version

N/A

Library version

v1.2.4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the retry change described in issue #769 and the Python library's handling of httpx.ReadTimeout. Compare that behavior with the 10-minute default timeout and determine a concrete, testable improvement. Done should mean read-timeout requests no longer accumulate excessive retry time while preserving the intended retry behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.