What changed in OpenAI Python SDK from 2 to 3
10 releases numbered after v2.54.0 up to and including v3.8.0, stable releases only. v2.54.0 and v3.8.0 are the newest stable releases of 2 and 3 we track; this page follows them as new ones ship.
- 1 mentions breaking changes
- 3 remove or deprecate something
35 changes across 10 releases
Added 11
- Add gpt-6-astra and related features
- Update usage APIs and documentation
- Add compute_units to Responses and Chat Completions usage
- Add obfuscation field to ChatCompletionChunk
- Add project residency configuration and cost quantity units
- Support named data-residency endpoints
- Add Bedrock Runtime endpoint support
- Add shell call streaming events and new service/image types
- Add WebSocket stream IDs
- Add workload identity access token issued event
- Add Ultrafast tier, structured MCP and websocket errors, and separate websocket events
Changed 4
- Make function call output call IDs optional
- Use the standard library for platform detection
- HTTPX2 is now the default HTTP client, and httpx is no longer installed automatically
- Applications using custom HTTPX clients, transports, or configuration objects must migrate to their HTTPX2 equivalents or use the temporary runtime-only legacy HTTPX escape hatch
Fixed 14
- Avoid repeated numpy checks for embeddings
- Encode Realtime call offers and session configuration
- Apply consistent origin checks to WebSocket redirects
- Encode deployment names consistently in Azure
- Keep provider validation errors value-free in Azure
- Resolve one authentication mode in Azure
- Compute custom-code summaries from trusted workflow code
- Create upload example fixtures in private directories
- Decode SSE incrementally without limiting event size
- Keep Python SDK diagnostics metadata-only
- Preserve Azure authentication boundaries across transports
- Preserve the configured TLS hostname
- Preserve WebSocket send queue byte accounting during flush
- Require patched optional networking dependencies
Removed 3
Deprecated 1
- Deprecate Sora video APIs
Original release notes, newest first
The list above is our reading of these notes; the originals from OpenAI are here, one fold per release.
v3.8.0
v3.7.0
v3.6.0
3.6.0 (2026-08-27)
Features
Bug Fixes
Chores
- deps-dev: bump @stdy/cli from 0.22.1 to 0.22.2 (#3719) (4f5598c)
- deps-dev: bump mypy from 1.17 to 2.3.1 (#3747) (0b52c9e)
- deps-dev: bump pandas-stubs from 2.2.2.240807 to 2.3.3.260113 (#3659) (95f0b43)
- deps-dev: bump pyright from 1.1.399 to 1.1.413 (#3744) (9917c6e)
- deps-dev: bump rich from 14.2.0 to 15.0.0 (#3717) (7a5484d)
- deps: bump actions/checkout from 6.0.2 to 7.0.1 (#3665) (d0a2550)
- deps: bump actions/download-artifact from 6.0.0 to 8.0.1 (#3669) (f627619)
- deps: bump github/codeql-action/init from 4.37.1 to 4.37.7 (#3745) (a36010d)
Build System
v3.5.0
v3.4.0
3.4.0 (2026-08-25)
Features
- api: Add obfuscation field to ChatCompletionChunk (#3690) (c7d8e1d)
- api: add project residency configuration and cost quantity units (#3726) (bc4f8ef)
Bug Fixes
- api: encode Realtime call offers and session configuration (#3736) (555ac48)
- apply consistent origin checks to WebSocket redirects (#3693) (1b324d0)
- azure: encode deployment names consistently (#3683) (689538d)
- azure: keep provider validation errors value-free (#3691) (72529c0)
- azure: resolve one authentication mode (#3689) (e3d0681)
- compute custom-code summaries from trusted workflow code (#3692) (2b5868d)
- create upload example fixtures in private directories (#3686) (f36e6f7)
- decode SSE incrementally without limiting event size (#3687) (2598d53)
- keep Python SDK diagnostics metadata-only (#3685) (600aa8d)
- Preserve Azure authentication boundaries across transports (#3684) (06ef57c)
- preserve the configured TLS hostname (#3694) (aa5fbc4)
- preserve WebSocket send queue byte accounting during flush (#3688) (96f966d)
Chores
- api: Clarify image background docs and preview support (#3703) (bedb9a7)
- api: document supported image generation models (#3695) (8edd9ae)
- api: move chat validation tests out of generated code (#3698) (9d3ba20)
- api: move webhook tests out of generated code (#3700) (04ecb3c)
- api: remove redundant generated formatting (#3696) (5ac1e03)
- api: remove redundant generated test edits (#3697) (351ef84)
- api: Update SDK generation metadata only (#3716) (e43b422)
- set a ceiling for Python SDK customization (#3714) (04d5d79)
Documentation
- api: restore generated ChatKit API index (#3705) (4534106)
- standardize Python SDK vulnerability disclosure policy (#3642) (1fc0a21)
Refactors
- api: isolate audio response format selection (#3701) (ece4324)
- api: isolate vector-store polling helpers (#3713) (a002ef3)
- api: move file processing polling into SDK-owned helpers (#3712) (5f20c51)
- api: share embedding response decoding (#3699) (50de9af)
- api: share webhook signature verification (#3704) (e14ac34)
v3.3.1
3.3.1 (2026-08-19)
Bug Fixes
Chores
- build: migrate to uv (#3653) (b37e85d)
- deps: remove jsonschema and unused fixture-validation dependencies (0dfdfdd)
- lock the repository Pyright toolchain (#3678) (3079be2)
- run the mock server from locked local tooling (#3679) (370fcc6)
Refactors
- deps: use the standard library for platform detection (d5b0065)
Build System
- replace the external README metadata hook (e673ca8)
v3.3.0
v3.2.0
v3.1.0
3.1.0 (2026-08-14)
Features
- api: add WebSocket stream IDs (#3612) (d9029e3)
- api: add workload identity access token issued event (#3601) (df274d4)
- api: deprecate Sora video APIs (#3610) (721cb1c)
- api: Ultrafast tier, structured MCP and websocket errors, separate websocket events (#3617) (f38355e)
Chores
v3.0.0
3.0.0 (2026-08-12)
⚠ BREAKING CHANGES
- api: HTTPX2 is now the default HTTP client, and
httpxis no longer installed automatically. Applications using custom HTTPX clients, transports, or configuration objects must migrate to their HTTPX2 equivalents or use the temporary, runtime-only legacy HTTPX escape hatch. See the HTTPX2 migration guide.
Features
- api: migrate to HTTPX2 (#3594)