Repository navigation
Comparing changes
Open a pull request
base repository: openai/openai-python
base: v3.29.0
head repository: openai/openai-python
compare: v3.30.0
- 9 commits
- 68 files changed
- 4 contributors
Commits on Oct 11, 2026
-
feat(api): add beta session spending limits (#4058)
## Summary Adds optional spending limits and reported consumption for beta agent sessions. ## Changes - Set session spending limits in USD cents when creating or updating a session. - Omit spend_control when updating to retain the limit; pass null or a null limit to remove it without resetting recorded spend. - Read configured limits and best-effort consumption from sessions; unlimited sessions omit spend_control. Co-authored-by: jbeckwith-oai <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b570279 - Browse repository at this point
Copy the full SHA b570279View commit details -
feat(api): add OCI external-storage provider support (#4060)
## Summary Adds OCI to external-storage provider requests and responses. ## Changes - Configure an OCI provider with its tenancy OCID, region, and bucket. - Recognize OCI alongside existing AWS, Azure, and GCP providers.
Configuration menu - View commit details
-
Copy full SHA for 9eb83fe - Browse repository at this point
Copy the full SHA 9eb83feView commit details -
feat(api): support image URLs and detailed safety alert explanations (#…
…4061) ## Summary Document HTTP(S) image URLs for Decisions inputs and expose detailed safety alert explanations. ## Changes - Document publicly accessible HTTP(S) image URLs alongside base64 data URLs in Decisions inputs. - Add optional detailed_explanation to safety alerts when an explanation is available for an eligible zero data retention alert.
Configuration menu - View commit details
-
Copy full SHA for 3c50399 - Browse repository at this point
Copy the full SHA 3c50399View commit details
Commits on Oct 12, 2026
-
feat(api): add organization Decisions usage reporting (#4062)
## Summary Query organization-wide Decisions API usage with the Python client. ## Changes - Add synchronous and asynchronous Decisions usage queries with list filters, grouping, and page cursors. - Read token counts, model request totals, and optional usage-source attribution. Co-authored-by: jbeckwith-oai <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5e7a23e - Browse repository at this point
Copy the full SHA 5e7a23eView commit details -
chore(api): clarify agent tool limits and environment pagination (#4065)
## Summary Document the agent tool-list size limit and hosted environment pagination. ## Changes - Describe the 3 MiB compact JSON limit for agent tool lists. - Clarify environment listing parameter descriptions and refresh request examples. Co-authored-by: jbeckwith-oai <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0f73f1d - Browse repository at this point
Copy the full SHA 0f73f1dView commit details
Commits on Oct 13, 2026
-
feat(api): support updating project API key expiry (#4066)
## Summary Adds support for updating an existing project API key’s expiration. ## Changes - Add client.admin.organization.projects.api_keys.update to set an expiry relative to the request time. - Require a project ID, API key ID, and expires_in_seconds value. - Return the updated project API key resource. Co-authored-by: jbeckwith-oai <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1f05e33 - Browse repository at this point
Copy the full SHA 1f05e33View commit details -
feat(api): expose image tool error and moderation details (#4072)
## Summary Read structured error details on image tool tool calls in Responses and beta Responses. ## Changes - Expose error code, type, message, and related parameter when available. - Expose optional moderation details including input/output stage and category names. Co-authored-by: jbeckwith-oai <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c5452af - Browse repository at this point
Copy the full SHA c5452afView commit details
Commits on Oct 14, 2026
-
fix(streaming): restore async HTTP/1.1 connection reuse (#4041)
## Changes being requested Restore **async HTTP/1.1 streaming connection reuse** after `[DONE]` with a 100 ms drain budget. When the HTTP body finishes within that budget, the connection returns to the pool. A timeout or transport failure closes it without failing completed output. The drain reads raw transport bytes without decoding trailing SSE or content. An AnyIO cancellation deadline handles stalled and trickling endings, including when the request read timeout is disabled. Response cleanup runs outside that deadline and is shielded from caller cancellation; cancellation still propagates. This applies only to async streams receiving `[DONE]` over HTTP/1.1. Synchronous streaming, HTTP/2, Responses streams without `[DONE]`, early exits, and pre-completion errors keep their existing behavior. No watchdog threads, dependency changes, or public API changes. Builds on the fresh transport-iterator approach in [Michał Rembalski's proposal](mrembalski@5d615ad). ## Why async only The synchronous approach we evaluated needed a temporary watchdog thread per stream to enforce a total drain deadline. A per-read timeout alone does not bound a response that keeps trickling bytes. In three synthetic runs of 1,024 requests at concurrency 128, sync HTTPX2 median batch time increased from **2.70 s to 3.23 s**. A diagnostic variant that retained reuse but removed the watchdog took **2.73 s**, isolating thread creation/joining as the main added cost. We therefore leave synchronous streaming unchanged rather than introduce that overhead in a performance fix. Async cleanup can enforce the deadline through cancellation without watchdog threads. A bounded sync implementation without the measured regression is separate work; HTTP/2 remains a connection-reuse workaround where supported. ## Validation Three focused regression tests cover: - Async connection reuse and recovery from silent, trickling, and truncated endings with read timeouts disabled, across HTTPX2, legacy HTTPX, and aiohttp. - Draining only async HTTP/1.1 streams, leaving sync and HTTP/2 unchanged. - Underlying-stream cleanup on caller cancellation and deadline expiry. After narrowing the scope: - Streaming/chat/agent suites: 217 passed, 8 skipped. - Pydantic v1 streaming/chat suites: 81 passed, 34 skipped. - Ruff, repository Pyright, and mypy passed. - Structural comparison confirms sync `Stream` matches main and the async implementation matches the version exercised by the TCP/TLS stress tests and 120 asyncio/Trio cancellation/recovery cycles. ## Performance and tradeoffs In three synthetic TLS comparisons of 1,024 measured requests at concurrency 128, async HTTPX2 median batch time improved from **3.16 s to 2.95 s** with connection reuse. Legacy HTTPX async has a separate pooling cost at high concurrency: a synthetic batch of 512 requests at concurrency 64 increased from 2.16 s to 5.06 s. Consuming ordinary EOF with an unpatched SDK reproduced that pooling cost. This PR does not change the transport's pool implementation. There is no fixed 100 ms sleep. Cleanup returns as soon as the HTTP body ends; a delayed ending can add up to the drain budget, plus scheduling and close overhead. These synthetic results are not production latency estimates or a guarantee that every workload becomes faster. ## Additional context & links Addresses the async streaming case of #4040. Related to #3440.
Configuration menu - View commit details
-
Copy full SHA for 1f6cfe1 - Browse repository at this point
Copy the full SHA 1f6cfe1View commit details -
Automated Release PR --- ## [3.30.0](v3.29.0...v3.30.0) (2026-10-14) ### Features * **api:** add beta session spending limits ([#4058](#4058)) ([b570279](b570279)) * **api:** add OCI external-storage provider support ([#4060](#4060)) ([9eb83fe](9eb83fe)) * **api:** add organization Decisions usage reporting ([#4062](#4062)) ([5e7a23e](5e7a23e)) * **api:** expose image tool error and moderation details ([#4072](#4072)) ([c5452af](c5452af)) * **api:** support image URLs and detailed safety alert explanations ([#4061](#4061)) ([3c50399](3c50399)) * **api:** support updating project API key expiry ([#4066](#4066)) ([1f05e33](1f05e33)) ### Bug Fixes * **streaming:** restore async HTTP/1.1 connection reuse ([#4041](#4041)) ([1f6cfe1](1f6cfe1)) ### Chores * **api:** clarify agent tool limits and environment pagination ([#4065](#4065)) ([0f73f1d](0f73f1d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: openai-sdks[bot] <284451331+openai-sdks[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 16a8340 - Browse repository at this point
Copy the full SHA 16a8340View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v3.29.0...v3.30.0