TL;DR
OpenAI has migrated to HTTPX2, enhancing its SDK's HTTP layer with both synchronous and asynchronous HTTP clients. This transition simplifies installation and improves interaction with response models and APIs.
✦ Why It Matters
Start using HTTPX2 today to simplify your application's HTTP interactions with OpenAI's SDK.
Key Takeaways
Full Summary
OpenAI's Python SDK now utilizes HTTPX2, replacing the previous httpx package, which is no longer installed automatically. This transition means that existing API calls and features like authentication and retries will continue to function without modification if the default client is used.
However, developers must now manage TLS certificate verification differently, as HTTPX2 relies on the operating system's trust store instead of the certifi package. This could lead to issues in environments lacking system CA certificates or those using corporate proxies.
Users are encouraged to install necessary CA certificates or configure their own certificate bundles. Additionally, the SDK provides new client helpers and maintains compatibility with existing HTTPX client configurations, but developers should prefer the new HTTPX2 client classes for future-proofing their applications.
Related