●Breaking
openai-python v3.0.0 — HTTPX2 Becomes Default HTTP Client, `httpx` No Longer Auto-Installed
What changed
openai-python v3.0.0 migrates the default HTTP client from
httpx to httpx2, and httpx is no longer automatically installed as a dependency. Applications using custom HTTPX clients, transports, authentication, or event hooks must either migrate their code to HTTPX2 equivalents (DefaultHttpx2Client / DefaultAsyncHttpx2Client) or use the temporary legacy escape hatch provided in this release. Parsed API models are unchanged; requests, raw responses, streaming responses, and transport-level exceptions may now be HTTPX2 objects at runtime.TL;DR
openai-python v3.0.0 makes HTTPX2 the default HTTP client and removes
httpx as an auto-installed dependency — any code that catches httpx exceptions, uses httpx-specific transports, or passes custom HTTPX clients breaks immediately on upgrade.Developer signal
Before running
pip install openai==3.0.0: (1) Check whether you pass a custom http_client to OpenAI() or AsyncOpenAI() — if you do, it must be a DefaultHttpx2Client or DefaultAsyncHttpx2Client after v3.0.0; (2) Grep for import httpx in any module that interacts with the OpenAI client — httpx exceptions (httpx.TimeoutException, httpx.ConnectError, etc.) will no longer be raised; the equivalent HTTPX2 exceptions may have different import paths and attributes; (3) If you use httpx-specific features like custom httpx.Timeout, httpx.Limits, or httpx.Auth objects passed to the client, you must swap these for HTTPX2 equivalents; (4) The migration guide is at httpx2.md in the openai-python repository — read this before upgrading. The legacy escape hatch is described as "runtime-only and temporary" — it is not a permanent workaround. Background: httpx has been effectively unmaintained since 2024; httpx2 is the successor maintained by Pydantic Services Inc. and is API-compatible for common HTTP usage, making the migration low-friction for most code but still requiring explicit action for any custom transport or error-handling logic.Affects you ifYou pass custom
http_client objects to OpenAI() or AsyncOpenAI(), catch httpx exceptions in your error handling, use httpx-specific transports or authentication, or have any mock/test infrastructure that patches httpx internals.EffortModerate (for common usage with no custom client: pip install openai httpx2; for custom client code: update imports and types to HTTPX2 equivalents; for test mocks of httpx internals: significant — test infrastructure must be rewritten).OpenAI / GitHub | Date: August 12, 2026 | Link: https://github.com/openai/openai-python/releases/tag/v3.0.0https://github.com/openai/openai-python/releases/tag/v3.0.0