Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openai/openai-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.29.0
Choose a base ref
...
head repository: openai/openai-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.30.0
Choose a head ref
  • 9 commits
  • 68 files changed
  • 4 contributors

Commits on Oct 11, 2026

  1. 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]>
    jbeckwith-oai and jbeckwith-oai authored Oct 11, 2026
    Configuration menu
    Copy the full SHA
    b570279 View commit details
    Browse the repository at this point in the history
  2. 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.
    jbeckwith-oai authored Oct 11, 2026
    Configuration menu
    Copy the full SHA
    9eb83fe View commit details
    Browse the repository at this point in the history
  3. 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.
    jbeckwith-oai authored Oct 11, 2026
    Configuration menu
    Copy the full SHA
    3c50399 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2026

  1. 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]>
    jbeckwith-oai and jbeckwith-oai authored Oct 12, 2026
    Configuration menu
    Copy the full SHA
    5e7a23e View commit details
    Browse the repository at this point in the history
  2. 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]>
    jbeckwith-oai and jbeckwith-oai authored Oct 12, 2026
    Configuration menu
    Copy the full SHA
    0f73f1d View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2026

  1. 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]>
    jbeckwith-oai and jbeckwith-oai authored Oct 13, 2026
    Configuration menu
    Copy the full SHA
    1f05e33 View commit details
    Browse the repository at this point in the history
  2. 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]>
    jbeckwith-oai and jbeckwith-oai authored Oct 13, 2026
    Configuration menu
    Copy the full SHA
    c5452af View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2026

  1. 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.
    marcuswood-oai authored Oct 14, 2026
    Configuration menu
    Copy the full SHA
    1f6cfe1 View commit details
    Browse the repository at this point in the history
  2. release: 3.30.0 (#4059)

    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>
    openai-sdks[bot] authored Oct 14, 2026
    Configuration menu
    Copy the full SHA
    16a8340 View commit details
    Browse the repository at this point in the history
Loading