# OpenAI Python SDK: what changed from 2 to 3 - Product: OpenAI Python SDK (https://whatsnew.fyi/product/openai-python) - Vendor: OpenAI - Range: changelog entries numbered after v2.54.0 up to and including v3.8.0, stable releases only - Entries below: 10 releases (newest first) - Resolved: 2 is v2.54.0 and 3 is v3.8.0, the newest stable release of each major we track - Carrying security changes: 2 · CVEs mentioned: 0 · Mentioning breaking changes: 1 · Removing or deprecating something: 3 - Page: https://whatsnew.fyi/product/openai-python/compare/2...3 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. ## What changed (35 changes, grouped by kind) ### Added #### v3.8.0 (2026-09-03) - Add gpt-6-astra and related features #### v3.7.0 (2026-09-02) - Update usage APIs and documentation #### v3.6.0 (2026-08-28) - Add compute_units to Responses and Chat Completions usage #### v3.4.0 (2026-08-26) - Add obfuscation field to ChatCompletionChunk - Add project residency configuration and cost quantity units #### v3.3.0 (2026-08-18) - Support named data-residency endpoints #### v3.2.0 (2026-08-17) - Add Bedrock Runtime endpoint support - Add shell call streaming events and new service/image types #### v3.1.0 (2026-08-14) - Add WebSocket stream IDs - Add workload identity access token issued event - Add Ultrafast tier, structured MCP and websocket errors, and separate websocket events ### Changed #### v3.5.0 (2026-08-27) - Make function call output call IDs optional #### v3.3.1 (2026-08-19) - Use the standard library for platform detection #### v3.0.0 (2026-08-12) - 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 #### v3.7.0 (2026-09-02) - Avoid repeated numpy checks for embeddings #### v3.4.0 (2026-08-26) - 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 #### v3.3.0 (2026-08-18) - Require patched optional networking dependencies ### Removed #### v3.3.1 (2026-08-19) - Remove jsonschema and unused fixture-validation dependencies #### v3.3.0 (2026-08-18) - Remove unused dependencies #### v3.1.0 (2026-08-14) - Remove Stainless attribution and infrastructure ### Deprecated #### v3.1.0 (2026-08-14) - Deprecate Sora video APIs ### Security #### v3.6.0 (2026-08-28) - Harden X.509 workload identity integration #### v3.3.1 (2026-08-19) - Update dependencies with published security fixes ## Release notes ### v3.8.0 - Date: 2026-09-03 - Version: v3.8.0 - Original notes: https://github.com/openai/openai-python/releases/tag/v3.8.0 - Permalink: https://whatsnew.fyi/product/openai-python/releases/v3.8.0 - **added** — Add gpt-6-astra and related features ##### [3.8.0](https://github.com/openai/openai-python/compare/v3.7.0...v3.8.0) (2026-09-03) ###### Features * **api:** add gpt-6-astra and related features ([#3791](https://github.com/openai/openai-python/issues/3791)) ([09f446f](https://github.com/openai/openai-python/commit/09f446f5f8623d79464568dc91b9dc258e74bcae)) ###### Documentation * add canonical SDK security model ([#3778](https://github.com/openai/openai-python/issues/3778)) ([2a097b9](https://github.com/openai/openai-python/commit/2a097b991bb23a26bde9da8ea286f850ac1329f1)) ### v3.7.0 - Date: 2026-09-02 - Version: v3.7.0 - Original notes: https://github.com/openai/openai-python/releases/tag/v3.7.0 - Permalink: https://whatsnew.fyi/product/openai-python/releases/v3.7.0 - **added** — Update usage APIs and documentation - **fixed** — Avoid repeated numpy checks for embeddings ##### [3.7.0](https://github.com/openai/openai-python/compare/v3.6.0...v3.7.0) (2026-09-02) ###### Features * **api:** update usage APIs and documentation ([#3779](https://github.com/openai/openai-python/issues/3779)) ([6f0da16](https://github.com/openai/openai-python/commit/6f0da16573086401a7b171f4bd14a78f22c9d0e9)) ###### Bug Fixes * avoid repeated numpy checks for embeddings ([#3757](https://github.com/openai/openai-python/issues/3757)) ([b19c216](https://github.com/openai/openai-python/commit/b19c2161b1eac80fbf1f6f67a64a50af99c53356)) ### v3.6.0 - Date: 2026-08-28 - Version: v3.6.0 - Original notes: https://github.com/openai/openai-python/releases/tag/v3.6.0 - Permalink: https://whatsnew.fyi/product/openai-python/releases/v3.6.0 - **added** — Add compute_units to Responses and Chat Completions usage - **security** — Harden X.509 workload identity integration ##### [3.6.0](https://github.com/openai/openai-python/compare/v3.5.0...v3.6.0) (2026-08-27) ###### Features * **api:** add compute_units to Responses and Chat Completions usage ([#3749](https://github.com/openai/openai-python/issues/3749)) ([52421d1](https://github.com/openai/openai-python/commit/52421d197e96b4480fcc16e78345578996452c79)) ###### Bug Fixes * **auth:** harden X.509 workload identity integration ([#3740](https://github.com/openai/openai-python/issues/3740)) ([fc3ad6c](https://github.com/openai/openai-python/commit/fc3ad6c55a1a250e16707396e86d7373f690a0fc)) ###### Chores * **deps-dev:** bump @stdy/cli from 0.22.1 to 0.22.2 ([#3719](https://github.com/openai/openai-python/issues/3719)) ([4f5598c](https://github.com/openai/openai-python/commit/4f5598c8d822fcc281bb8862e424fa6ead310ca8)) * **deps-dev:** bump mypy from 1.17 to 2.3.1 ([#3747](https://github.com/openai/openai-python/issues/3747)) ([0b52c9e](https://github.com/openai/openai-python/commit/0b52c9ecbc2bfe7059a1273674dff7647d414141)) * **deps-dev:** bump pandas-stubs from 2.2.2.240807 to 2.3.3.260113 ([#3659](https://github.com/openai/openai-python/issues/3659)) ([95f0b43](https://github.com/openai/openai-python/commit/95f0b43d31599fe501f045dcc24964d1df5e196f)) * **deps-dev:** bump pyright from 1.1.399 to 1.1.413 ([#3744](https://github.com/openai/openai-python/issues/3744)) ([9917c6e](https://github.com/openai/openai-python/commit/9917c6e28e66e90e1227b3d223c06a8c5441515a)) * **deps-dev:** bump rich from 14.2.0 to 15.0.0 ([#3717](https://github.com/openai/openai-python/issues/3717)) ([7a5484d](https://github.com/openai/openai-python/commit/7a5484d8118e82ec004e964ab2ca484c7dd7c555)) * **deps:** bump actions/checkout from 6.0.2 to 7.0.1 ([#3665](https://github.com/openai/openai-python/issues/3665)) ([d0a2550](https://github.com/openai/openai-python/commit/d0a25503498b51495aa4a1dbb97e616a24cd840e)) * **deps:** bump actions/download-artifact from 6.0.0 to 8.0.1 ([#3669](https://github.com/openai/openai-python/issues/3669)) ([f627619](https://github.com/openai/openai-python/commit/f6276194cda9b95499d3ebc3d6d013e730bf0490)) * **deps:** bump github/codeql-action/init from 4.37.1 to 4.37.7 ([#3745](https://github.com/openai/openai-python/issues/3745)) ([a36010d](https://github.com/openai/openai-python/commit/a36010dbb5d9c15a1fdf780772bc0204d0acf138)) ###### Build System * **deps:** bump actions/setup-python from 5.6.0 to 7.0.0 ([#3672](https://github.com/openai/openai-python/issues/3672)) ([d765db7](https://github.com/openai/openai-python/commit/d765db7e929e76fc9e7edcc3a058d723ec69ac51)) * **deps:** bump pypa/gh-action-pypi-publish from 1.14.0 to 1.14.2 ([#3666](https://github.com/openai/openai-python/issues/3666)) ([dacbb66](https://github.com/openai/openai-python/commit/dacbb6646d1b18257545dbb29badf8a9311ed0ae)) ### v3.5.0 - Date: 2026-08-27 - Version: v3.5.0 - Original notes: https://github.com/openai/openai-python/releases/tag/v3.5.0 - Permalink: https://whatsnew.fyi/product/openai-python/releases/v3.5.0 - **changed** — Make function call output call IDs optional ##### [3.5.0](https://github.com/openai/openai-python/compare/v3.4.0...v3.5.0) (2026-08-27) ###### Features * **api:** make function call output call IDs optional ([#3738](https://github.com/openai/openai-python/issues/3738)) ([c74501d](https://github.com/openai/openai-python/commit/c74501d7dc6946633fead7883ad02d8a188cf605)) ### v3.4.0 - Date: 2026-08-26 - Version: v3.4.0 - Original notes: https://github.com/openai/openai-python/releases/tag/v3.4.0 - Permalink: https://whatsnew.fyi/product/openai-python/releases/v3.4.0 - **added** — Add obfuscation field to ChatCompletionChunk - **added** — Add project residency configuration and cost quantity units - **fixed** — Encode Realtime call offers and session configuration - **fixed** — Apply consistent origin checks to WebSocket redirects - **fixed** — Encode deployment names consistently in Azure - **fixed** — Keep provider validation errors value-free in Azure - **fixed** — Resolve one authentication mode in Azure - **fixed** — Compute custom-code summaries from trusted workflow code - **fixed** — Create upload example fixtures in private directories - **fixed** — Decode SSE incrementally without limiting event size - **fixed** — Keep Python SDK diagnostics metadata-only - **fixed** — Preserve Azure authentication boundaries across transports - **fixed** — Preserve the configured TLS hostname - **fixed** — Preserve WebSocket send queue byte accounting during flush ##### [3.4.0](https://github.com/openai/openai-python/compare/v3.3.1...v3.4.0) (2026-08-25) ###### Features * **api:** Add obfuscation field to ChatCompletionChunk ([#3690](https://github.com/openai/openai-python/issues/3690)) ([c7d8e1d](https://github.com/openai/openai-python/commit/c7d8e1d26be1f958e55c80f26b648f768afabdf2)) * **api:** add project residency configuration and cost quantity units ([#3726](https://github.com/openai/openai-python/issues/3726)) ([bc4f8ef](https://github.com/openai/openai-python/commit/bc4f8efdbc1f8fa6b78935e205780e259d83576d)) ###### Bug Fixes * **api:** encode Realtime call offers and session configuration ([#3736](https://github.com/openai/openai-python/issues/3736)) ([555ac48](https://github.com/openai/openai-python/commit/555ac487f450f24928d859478ea2f41b58906206)) * apply consistent origin checks to WebSocket redirects ([#3693](https://github.com/openai/openai-python/issues/3693)) ([1b324d0](https://github.com/openai/openai-python/commit/1b324d044dcedc377e688c405416f928b0aedfb6)) * **azure:** encode deployment names consistently ([#3683](https://github.com/openai/openai-python/issues/3683)) ([689538d](https://github.com/openai/openai-python/commit/689538d531692e30ac1928779e6f1b97cc95db45)) * **azure:** keep provider validation errors value-free ([#3691](https://github.com/openai/openai-python/issues/3691)) ([72529c0](https://github.com/openai/openai-python/commit/72529c013707e7b5ed99edbc836603618a1e4be6)) * **azure:** resolve one authentication mode ([#3689](https://github.com/openai/openai-python/issues/3689)) ([e3d0681](https://github.com/openai/openai-python/commit/e3d06812535d7f2fe1bc6e57c12bd0ac0dd4acd1)) * compute custom-code summaries from trusted workflow code ([#3692](https://github.com/openai/openai-python/issues/3692)) ([2b5868d](https://github.com/openai/openai-python/commit/2b5868da23cb61876ec27d76591ea5fdb2b8c14d)) * create upload example fixtures in private directories ([#3686](https://github.com/openai/openai-python/issues/3686)) ([f36e6f7](https://github.com/openai/openai-python/commit/f36e6f79662b22e9d8f1660d4576b4b15cd8ac76)) * decode SSE incrementally without limiting event size ([#3687](https://github.com/openai/openai-python/issues/3687)) ([2598d53](https://github.com/openai/openai-python/commit/2598d530cf682784465e9f82558a830ac5f94486)) * keep Python SDK diagnostics metadata-only ([#3685](https://github.com/openai/openai-python/issues/3685)) ([600aa8d](https://github.com/openai/openai-python/commit/600aa8daade4c9df87deb76f6b8442ee828a7cbc)) * Preserve Azure authentication boundaries across transports ([#3684](https://github.com/openai/openai-python/issues/3684)) ([06ef57c](https://github.com/openai/openai-python/commit/06ef57caafe73d625ad4458ab5d29241e30c44bc)) * preserve the configured TLS hostname ([#3694](https://github.com/openai/openai-python/issues/3694)) ([aa5fbc4](https://github.com/openai/openai-python/commit/aa5fbc401f179fc515905d84623718c2b66ec653)) * preserve WebSocket send queue byte accounting during flush ([#3688](https://github.com/openai/openai-python/issues/3688)) ([96f966d](https://github.com/openai/openai-python/commit/96f966d77bddc7449ae23fda5b29ef44c3f98cc2)) ###### Chores * **api:** Clarify image background docs and preview support ([#3703](https://github.com/openai/openai-python/issues/3703)) ([bedb9a7](https://github.com/openai/openai-python/commit/bedb9a7b8839e193107e88b92f7cc166f08ac83d)) * **api:** document supported image generation models ([#3695](https://github.com/openai/openai-python/issues/3695)) ([8edd9ae](https://github.com/openai/openai-python/commit/8edd9ae411f9d0a5385447a4697c9f7042868213)) * **api:** move chat validation tests out of generated code ([#3698](https://github.com/openai/openai-python/issues/3698)) ([9d3ba20](https://github.com/openai/openai-python/commit/9d3ba20f9567a62b2ebb3542661a60dc4ed2fd67)) * **api:** move webhook tests out of generated code ([#3700](https://github.com/openai/openai-python/issues/3700)) _[Truncated at 4000 characters — full notes: https://github.com/openai/openai-python/releases/tag/v3.4.0]_ ### v3.3.1 - Date: 2026-08-19 - Version: v3.3.1 - Original notes: https://github.com/openai/openai-python/releases/tag/v3.3.1 - Permalink: https://whatsnew.fyi/product/openai-python/releases/v3.3.1 - **security** — Update dependencies with published security fixes - **removed** — Remove jsonschema and unused fixture-validation dependencies - **changed** — Use the standard library for platform detection ##### [3.3.1](https://github.com/openai/openai-python/compare/v3.3.0...v3.3.1) (2026-08-19) ###### Bug Fixes * **deps:** update dependencies with published security fixes ([#3680](https://github.com/openai/openai-python/issues/3680)) ([53aa4fc](https://github.com/openai/openai-python/commit/53aa4fc68b65f42456cafaaa5ff4b0d317184752)) ###### Chores * **build:** migrate to uv ([#3653](https://github.com/openai/openai-python/issues/3653)) ([b37e85d](https://github.com/openai/openai-python/commit/b37e85d8fe9cd2b23862dbc62716d38e2cacaf92)) * **deps:** remove jsonschema and unused fixture-validation dependencies ([0dfdfdd](https://github.com/openai/openai-python/commit/0dfdfdddfbeb591a1bb5b3b4aa62e4a9870fcaa6)) * lock the repository Pyright toolchain ([#3678](https://github.com/openai/openai-python/issues/3678)) ([3079be2](https://github.com/openai/openai-python/commit/3079be224c05479b6cf8aa329480c249f66f0599)) * run the mock server from locked local tooling ([#3679](https://github.com/openai/openai-python/issues/3679)) ([370fcc6](https://github.com/openai/openai-python/commit/370fcc60ce9006db5a75dcd0333790dfe71a907c)) ###### Refactors * **deps:** use the standard library for platform detection ([d5b0065](https://github.com/openai/openai-python/commit/d5b00659d6659c5def665cb04e6563bdf683ea03)) ###### Build System * replace the external README metadata hook ([e673ca8](https://github.com/openai/openai-python/commit/e673ca8ff9e5c2292615976e99bf5731d47327e8)) ### v3.3.0 - Date: 2026-08-18 - Version: v3.3.0 - Original notes: https://github.com/openai/openai-python/releases/tag/v3.3.0 - Permalink: https://whatsnew.fyi/product/openai-python/releases/v3.3.0 - **added** — Support named data-residency endpoints - **fixed** — Require patched optional networking dependencies - **removed** — Remove unused dependencies ##### [3.3.0](https://github.com/openai/openai-python/compare/v3.2.0...v3.3.0) (2026-08-18) ###### Features * support named data-residency endpoints ([#3646](https://github.com/openai/openai-python/issues/3646)) ([11ee914](https://github.com/openai/openai-python/commit/11ee91475694d9cd77813763707fbadf68806d4f)) ###### Bug Fixes * require patched optional networking dependencies ([#3651](https://github.com/openai/openai-python/issues/3651)) ([40e56de](https://github.com/openai/openai-python/commit/40e56de55166a55be3572fdf9750145d4458e144)) ###### Chores * remove unused dependencies and pin build tooling ([#3650](https://github.com/openai/openai-python/issues/3650)) ([eee8e4a](https://github.com/openai/openai-python/commit/eee8e4a7d0e42bb0d6b9aa01c4dd8e04aaac3ff4)) ###### Documentation * strengthen Python SDK security contribution guidance ([#3639](https://github.com/openai/openai-python/issues/3639)) ([6577709](https://github.com/openai/openai-python/commit/6577709190ae5e258d0270870f701432f67e6a3e)) ### v3.2.0 - Date: 2026-08-17 - Version: v3.2.0 - Original notes: https://github.com/openai/openai-python/releases/tag/v3.2.0 - Permalink: https://whatsnew.fyi/product/openai-python/releases/v3.2.0 - **added** — Add Bedrock Runtime endpoint support - **added** — Add shell call streaming events and new service/image types ##### [3.2.0](https://github.com/openai/openai-python/compare/v3.1.0...v3.2.0) (2026-08-17) ###### Features * add Bedrock Runtime endpoint support (SDK-290) ([#3623](https://github.com/openai/openai-python/issues/3623)) ([86267d2](https://github.com/openai/openai-python/commit/86267d2737e61e389e9260a18f99bcc1a634811b)) * **api:** Add shell call streaming events and new service/image types ([#3635](https://github.com/openai/openai-python/issues/3635)) ([ff14a33](https://github.com/openai/openai-python/commit/ff14a33c1b21c36b9e43a0150a3818ee3aa3712a)) ### v3.1.0 - Date: 2026-08-14 - Version: v3.1.0 - Original notes: https://github.com/openai/openai-python/releases/tag/v3.1.0 - Permalink: https://whatsnew.fyi/product/openai-python/releases/v3.1.0 - **added** — Add WebSocket stream IDs - **added** — Add workload identity access token issued event - **deprecated** — Deprecate Sora video APIs - **added** — Add Ultrafast tier, structured MCP and websocket errors, and separate websocket events - **removed** — Remove Stainless attribution and infrastructure ##### [3.1.0](https://github.com/openai/openai-python/compare/v3.0.0...v3.1.0) (2026-08-14) ###### Features * **api:** add WebSocket stream IDs ([#3612](https://github.com/openai/openai-python/issues/3612)) ([d9029e3](https://github.com/openai/openai-python/commit/d9029e3ada3c008b4631d78a425743445730892a)) * **api:** add workload identity access token issued event ([#3601](https://github.com/openai/openai-python/issues/3601)) ([df274d4](https://github.com/openai/openai-python/commit/df274d44f5207febff3231f3a707f1d2265917b5)) * **api:** deprecate Sora video APIs ([#3610](https://github.com/openai/openai-python/issues/3610)) ([721cb1c](https://github.com/openai/openai-python/commit/721cb1cd1cacb71237db4403d80a01403af61248)) * **api:** Ultrafast tier, structured MCP and websocket errors, separate websocket events ([#3617](https://github.com/openai/openai-python/issues/3617)) ([f38355e](https://github.com/openai/openai-python/commit/f38355ecdf69b231be218e572f591ce7f389a211)) ###### Chores * remove Stainless attribution and infrastructure ([#3599](https://github.com/openai/openai-python/issues/3599)) ([a1eeab5](https://github.com/openai/openai-python/commit/a1eeab58db02de46717ccebaf1eb83e314fa86ff)) ### v3.0.0 - Date: 2026-08-12 - Version: v3.0.0 - Original notes: https://github.com/openai/openai-python/releases/tag/v3.0.0 - Permalink: https://whatsnew.fyi/product/openai-python/releases/v3.0.0 - **changed** — HTTPX2 is now the default HTTP client, and httpx is no longer installed automatically - **changed** — 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 ##### [3.0.0](https://github.com/openai/openai-python/compare/v2.54.0...v3.0.0) (2026-08-12) ###### ⚠ BREAKING CHANGES * **api:** 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. See the [HTTPX2 migration guide](https://github.com/openai/openai-python/blob/main/httpx2.md). ###### Features * **api:** migrate to HTTPX2 ([#3594](https://github.com/openai/openai-python/pull/3594))