← All stories
● Covered by 1 source · 1 reportLow impact1 neutral

OpenAI Python SDK Migrates to HTTPX2 for HTTP Clients

🔄 Updated 1h ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • OpenAI Python SDK now uses HTTPX2.
  • HTTPX2 is installed automatically with the SDK.
  • Default TLS trust store behavior has changed.
  • Applications relying on `httpx` must add their own dependency.

SDK Client Update

The OpenAI Python SDK has updated its synchronous and asynchronous HTTP clients to use HTTPX2. This new dependency is automatically installed when the `openai` package is installed. The previous `httpx` package is no longer a transitive dependency of the SDK.

Impact on Existing Applications

For applications that construct `OpenAI` or `AsyncOpenAI` clients without providing a custom `http_client`, existing API calls, response models, streaming APIs, authentication, retries, and numeric timeouts will continue to function as before. However, applications that previously relied on the SDK to transitively install `httpx` will now need to explicitly add `httpx` as a dependency or migrate those imports to `httpx2`.

TLS Trust Store Changes

A significant change introduced by HTTPX2 is its default TLS trust store behavior. While HTTPX previously verified certificates against the `certifi` CA bundle, HTTPX2 now uses the operating-system trust store. The SDK no longer installs `certifi`.

This modification can cause certificate verification issues in environments such as minimal container images lacking system CA certificates, setups using corporate TLS-inspecting proxies, or deployments that depended on a custom `certifi` bundle. Users can address this by installing required CA certificates in the operating-system trust store or by configuring an explicit certificate bundle using `SSL_CERT_FILE` or `SSL_CERT_DIR` environment variables. Alternatively, a custom `ssl.SSLContext` can be passed to the `verify` parameter of `DefaultHttpx2Client` or `DefaultAsyncHttpx2Client`.

Configuring HTTPX2 Clients

The SDK provides helper classes like `DefaultHttpx2Client` and `DefaultAsyncHttpx2Client` to preserve recommended timeout, connection-pool, and redirect defaults when configuring custom HTTPX2 clients. These helpers can be used to integrate `httpx2` specific configurations, such as proxies, while maintaining SDK defaults.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~16 min · 14 stories · Aug 28

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

The OpenAI Python SDK now uses HTTPX2 for its synchronous and asynchronous HTTP clients, automatically installing it with the SDK. This change affects applications that interact with the SDK's HTTP layer, particularly regarding TLS trust store behavior and direct `httpx` dependencies.