feat: support OpenAI Python 3 and HTTPX2 - #4380
Merged
Merged
Conversation
seratch
force-pushed
the
feat/openai-3-httpx2
branch
from
August 13, 2026 02:44
f4b4d11 to
b50b32d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b50b32d743
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
seratch
force-pushed
the
feat/openai-3-httpx2
branch
from
August 13, 2026 03:00
b50b32d to
f8570e3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the 0.21.0 development line to require
openai>=3.0.0,<4and completes the migration to the HTTPX2 transport introduced by OpenAI Python 3.Changes
httpx2.AsyncClientinstances.httpx2.Clientwhile preserving connection pooling, retry, deadline, shutdown, and cleanup behavior.httpxis installed, without making it a core dependency.httpxdependency supplied by MCP.httpxfrom the requiredopenai-agentsdependency set.Dependency ownership
A clean core installation now contains OpenAI Python 3 and HTTPX2 without installing legacy
httpx.Legacy HTTPX remains available where another dependency owns it:
httpx>=0.27.1.httpx>=0.27.0,<1, so upgrading Vercel would not currently migrate that integration to HTTPX2.httpxexplicitly.User migration
Most users do not need to change application code beyond accepting the OpenAI Python 3 dependency upgrade.
Users who configure the OpenAI HTTP layer directly should migrate custom clients, transports, authentication, event hooks, mock transports, timeout values, URLs, requests, responses, and exception handling from
httpxtohttpx2. OpenAI'sDefaultHttpx2ClientandDefaultAsyncHttpx2Clienthelpers are the preferred client implementations.The Agents SDK does not attempt to convert arbitrary legacy HTTPX objects to HTTPX2. OpenAI Python's temporary legacy-client compatibility path remains usable when the application explicitly installs
httpx, but applications should treat that as a migration bridge rather than a permanent API.MCP v1 and Vercel users do not need an additional
httpxdeclaration because those integrations provide their own dependency.Compatibility and validation
Existing Agents SDK public provider, model, voice, tracing, and retry APIs retain their signatures and behavior. Retry and replay authority, streaming and non-streaming behavior, WebSocket timeout handling, tracing shutdown semantics, and MCP v1/v2 compatibility remain unchanged apart from the underlying transport ownership.
The migration was validated with:
httpx.