Change8

OpenAI Python SDK

AI & LLMs

The official Python library for the OpenAI API

Latest: v3.6.025 releases1 breaking changes10 common errorsView on GitHub

Release History

View all versions →
v3.6.01 fix1 feature
Aug 28, 2026

This release introduces compute_units to API responses and enhances the X.509 workload identity integration. Several development and build system dependencies have also been updated.

v3.5.01 feature
Aug 27, 2026

This release introduces a change to function call outputs, making call IDs optional. This aims to provide more flexibility in how function call results are handled.

v3.4.012 fixes2 features
Aug 26, 2026

This release introduces new features like obfuscation in ChatCompletionChunk and project residency configuration. It also includes numerous bug fixes across API, Azure, and WebSocket handling, along with documentation updates and internal refactors.

v3.3.11 fix
Aug 19, 2026

This release addresses security vulnerabilities by updating dependencies and includes several build and dependency management improvements, such as migrating to uv and removing unused packages.

v3.3.01 fix1 feature
Aug 18, 2026

This release introduces support for named data-residency endpoints and ensures patched optional networking dependencies are required. It also includes updates to dependency management and documentation.

v3.2.02 features
Aug 17, 2026

This release introduces support for Bedrock Runtime endpoints and adds new features for shell call streaming events and service/image types.

v3.1.03 features
Aug 14, 2026

This release introduces several API enhancements including WebSocket stream IDs, workload identity access token events, and the Ultrafast tier. Sora video APIs have been deprecated.

v3.0.0Breaking1 feature
Aug 12, 2026

This release upgrades the default HTTP client to HTTPX2, requiring migration for applications with custom HTTPX configurations. The `httpx` package is no longer installed automatically.

v2.54.01 fix1 feature
Aug 11, 2026

This release adds new model identifiers for Responses and clarifies audio upload metadata requirements.

v2.53.02 fixes2 features
Aug 3, 2026

This release introduces support for the gpt-5.5 model and enhances Response types with tool name and namespace information. It also includes CI improvements to avoid NumPy source builds and duplicate HTTPX coverage.

v2.52.1
Aug 3, 2026

This release is a patch version (2.52.1) that primarily focuses on CI improvements by pinning the setup-uv action to a specific commit for better reproducibility.

v2.52.01 fix1 feature
Jul 31, 2026

This release introduces content provenance checks for the API and improves the client's handling of retry delays. It also includes documentation updates for mTLS HTTP client recipes.

v2.51.01 fix1 feature
Jul 30, 2026

This release introduces a new 'fast tier' for API usage and includes bug fixes to integrate this feature into helper methods.

v2.50.01 fix1 feature
Jul 28, 2026

This release includes updates to transcription models for the API and restores a keyword overload for audio transcriptions.

v2.49.01 feature
Jul 27, 2026

This release introduces a new minimum Python version requirement of 3.10 and includes automation for version reviews.

v2.48.02 features
Jul 23, 2026

This release introduces the ability to accept `None` for `prompt_cache_key`/`safety_identifier` and adds support for `spend_limit` admin APIs.

v2.47.01 fix2 features
Jul 22, 2026

This release introduces experimental support for HTTPX2 clients and enhances CI workflow templates. It also addresses a dependency issue by requiring a patched aiohttp version for Python 3.10 and above.

v2.46.02 fixes4 features
Jul 17, 2026

This release introduces a new endpoint for managing API keys within projects and adds support for owner project access. It also includes bug fixes for type compatibility and the removal of beta annotation aliases.

v2.45.01 fix1 feature
Jul 9, 2026

This release introduces support for gpt-5.6-sol model updates and fixes an issue with beta resource access.

v2.44.01 fix
Jun 24, 2026

Release 2.44.0 primarily addresses a bug in authentication header prioritization.

v2.43.01 feature
Jun 17, 2026

Release 2.43.0 primarily updates the underlying OpenAPI specification or Stainless configuration.

v2.42.03 features
Jun 16, 2026

This release introduces new API features including admin spend alerts, manual updates, and OpenAPI spec configuration updates.

v2.41.1
Jun 10, 2026

This patch release primarily addresses internal build system maintenance by removing a scheduled release workflow trigger.

v2.41.01 feature
Jun 3, 2026

This release introduces new features allowing direct access to moderation results on API responses for both general responses and chat completions.

v2.40.01 fix1 feature
Jun 1, 2026

This release introduces support for Amazon Bedrock Responses and fixes an issue allowing Bedrock API keys to be set directly on the client.

Common Errors

BadRequestError24 reports

BadRequestError in openai-python-sdk usually arises from malformed requests sent to the OpenAI API. This can happen due to incorrect data types, missing required parameters, or invalid values in your API request. To fix, carefully validate your request data against the OpenAI API documentation for the specific endpoint you are using, paying close attention to the expected schema and data types; also, ensure your pydantic models correctly reflect the expected schema if using them.

NotFoundError8 reports

The "NotFoundError" in the openai-python-sdk often arises from using an incorrect or unsupported API endpoint, particularly with Azure OpenAI or preview API versions. To resolve this, double-check that the API endpoint, deployment name, and API version are accurate and supported by your Azure OpenAI service and model. Ensure that the requested functionality (e.g., edits, tools) is available for the specific model and API version you're using.

InternalServerError4 reports

"InternalServerError" errors in the OpenAI Python SDK often indicate a problem on OpenAI's server-side, or issues in the request that the server cannot properly process. To fix it, first, ensure your request data is correctly formatted and validated against the API documentation, especially for complex types like `decimal.Decimal` fields or file content requests. If the issue persists, consider implementing retry logic with exponential backoff to handle temporary server hiccups and report the issue to OpenAI support if it continues.

RemoteProtocolError3 reports

This error usually indicates network instability or the server closing the connection prematurely, often due to timeouts. Implement retry logic with exponential backoff using libraries like `tenacity` around your OpenAI API calls to gracefully handle transient network issues and server-side hiccups. Additionally, consider increasing the timeout settings in your `openai` client configuration to allow more time for the server to respond.

LengthFinishReasonError2 reports

LengthFinishReasonError usually means the OpenAI API stopped generating tokens because it hit the `max_tokens` limit you specified in your request. Increase the `max_tokens` parameter in your API call to allow the model to complete its response, or consider streaming the response to handle potentially long outputs.

ImportError2 reports

This ImportError often arises due to inconsistencies between the openai package version and its dependencies, particularly when dealing with streaming functionality. To resolve this, upgrade the `openai` package and its dependencies, especially `requests` and `urllib3`, using pip: `pip install --upgrade openai requests urllib3`. If the error persists, try creating a new virtual environment to ensure a clean installation.

Related AI & LLMs Packages

Subscribe to Updates

Get notified when new versions are released

RSS Feed