Back to Explore

openai/openai-python

GitHub
15 updates · last 90 days1 watchersOpen source

Last release: 2026-06-10

OpenAI’s official Python library for building applications that use the OpenAI API. Useful for developers who want to authenticate and make API requests from Python.

Project status

  • This source (openai/openai-python) appears actively maintained, with recent commits and frequent tagged updates (latest push 2026-06-03, most recent update v2.41.0 on 2026-06-03).
  • The update cadence is high, with multiple updates in short windows (notably v2.40.0 and v2.39.0 on 2026-06-01, then v2.41.0 on 2026-06-03, and earlier rapid iterations in May such as v2.35.0 and v2.35.1 on 2026-05-06).

AI summary generated 2026-06-04

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v2.41.1

    2026-06-10

    Release v2.41.1 contains only build and release-process related changes, plus the expected version bump to 2.41.1. The published release notes mention only removal of the scheduled workflow trigger, but the code diff shows a larger refactor of the PyPI publishing pipeline.

  • v2.41.0

    2026-06-03

    v2.41.0 adds moderation support to both the Responses API and Chat Completions API. The change introduces a new optional `moderation` configuration (currently only a `model` field) and extends response/chunk models to carry moderation results when that option is used.

    Features
  • v2.40.0

    2026-06-01

    v2.40.0 adds support for Amazon Bedrock's OpenAI-compatible “Responses” API by introducing BedrockOpenAI and AsyncBedrockOpenAI clients. It also improves configuration so Bedrock API keys can be set directly on the client/module client. The bulk of the change is new Bedrock-specific client logic plus wiring into the library’s module client selection.

    Features
  • v2.39.0

    2026-06-01

    v2.39.0 adds new Admin Organization audit log event types for workload identity providers, and introduces support for an additional_tools item in Responses/Conversation parsing. It also updates ActionSearch.query handling to be optional as described in the release notes. The code diff additionally introduces a new request parameter (personality) and updates prompt cache retention documentation, neither of which are mentioned in the release notes.

    Features
  • v2.38.0

    2026-05-21

    Release v2.38.0 contains a largely automated OpenAPI/Stainless update, reflected by a very large number of generated model/type additions (+9938 lines, -18 lines deleted). The release notes are high-level and do not explicitly list concrete API surface changes, fixes, or breaking behavior.

  • v2.37.0

    2026-05-15

    v2.37.0 adds a new optional request parameter, `service_tier`, to the Responses `compact` method. It also improves request validation for Pydantic iterators by eagerly validating iterable inputs, and adjusts workload identity auth to stop sending an unnecessary `client_id`.

    BreakingFeatures
  • v2.36.0

    2026-05-07

    v2.36.0 is a Realtime-focused release that expands the SDK surface for a new reasoning-capable model family and a new whisper transcription path. The release notes only mention “manual updates” and “realtime 2”, but the code also introduces new configuration types, new model enum values, and a Realtime session response shape change that is not called out in the notes.

    Features
  • v2.35.1

    2026-05-06

    This is a targeted patch release that fixes a regression in image generation size handling. The generated client types and image resource signatures were regenerated to explicitly enumerate supported size values, while the runtime behavior appears unchanged beyond the accepted request schema.

  • v2.35.0

    2026-05-06

    v2.35.0 is mostly a cleanup and API-refresh release: it updates image-related API support, applies manual schema/API adjustments, and removes the legacy Python CLI entrypoint. The diff is dominated by deleting the old CLI implementation, so most of the user-visible impact is around command-line tooling rather than core SDK behavior.

    BreakingFeatures
  • v2.34.0

    2026-05-04

    This release expands the SDK's admin-API surface and refactors authentication so credentials can be selected per request, while also adding env-driven custom headers and several auth/type fixes. It also includes a multipart-copy performance optimization and a broad set of generated admin/manual endpoint updates.

    Features
  • v2.33.0

    2026-04-28

    This release is a small OpenAPI-driven refresh of the generated OpenAI Python client. The only explicitly documented user-facing change is a prompt-cache enum correction from `in-memory` to `in_memory`, alongside a general API update and CI cleanup.

    BreakingFeatures
  • v2.32.0

    2026-04-15

    v2.32.0 adds richer input-file metadata and significantly expands the websocket stack with reconnect support, event-handler hooks, and buffered sends for realtime/streaming clients. It also includes a serialization bug fix for file data and refreshed examples.

    Features
  • v2.31.0

    2026-04-08

    v2.31.0 adds support for short‑lived tokens, sending raw data over WebSockets, and a new conversations.message.phase field. It also fixes query‑param merging to preserve hardcoded params and adjusts type definitions (removal of web_search_call.results from ResponseIncludable), which may require minor changes for typed clients.

    BreakingFeatures
  • v2.30.0

    2026-03-25

    v2.30.0 adds a new keys field for several computer (mouse) actions and tightens SDK response typings/schema alignment. Important type/response-shape changes (including making ResponseInputMessageItem.type required) may require code/type updates before upgrading.

    BreakingFeatures
  • v2.29.0

    2026-03-17

    This release (v2.29.0) adds support for new model slugs (5.4 nano and mini), extends the Batches create API to accept a /v1/videos endpoint, introduces new fields/operators (ToolFunction.defer_loading and ComparisonFilter 'in'/'nin'), and includes a couple of compatibility bug fixes. Developers should pay attention to a dependency bump for typing-extensions and a change in pydantic serialization behavior that may affect output shape.

    BreakingFeatures
  • v2.28.0

    2026-03-13

    This release adds first-class support for custom voices in the client API, enabling use of custom voice models (likely for text-to-speech/audio) from the SDK. No other changes or breaking changes are documented in the release notes, so upgrade risk appears low—review the API docs for the new endpoints/methods before adopting.

    Features
  • v2.27.0

    2026-03-13

    This release expands the Sora/video surface area with character creation plus video edit/extend workflows, and it also refreshes the Realtime/Responses WebSocket plumbing. The codegen update adds several new video types/endpoints and tweaks request handling around video uploads.

    Features
  • v2.26.0

    2026-03-05

    This release makes the ComputerTool GA and switches its implementation to a new class (noted in the notes as "CompuerTool"). The previously named tool identifier 'computer_use_preview' has been moved/renamed to ComputerUsePreview — this is likely to require updating imports/references before upgrading.

    BreakingFeatures
  • v2.25.0

    2026-03-05

    This release adds the gpt-5.4 model plus two new tool types (a tool search tool and a computer tool). It also removes the responses.prompt_cache_key field (breaking) and contains schema fixes and a subsequent re-add of the message 'phase' field—verify message schemas after upgrading.

    BreakingFeatures
  • v2.24.0

    2026-02-24

    v2.24.0 introduces a new 'phase' API surface and corrects related enum and documentation issues. There are no other functional changes; internal tests and SSE parsing were refactored but should not affect public API behavior.

    Features