Repository navigation
Comparing changes
Open a pull request
base repository: openai/openai-python
base: v3.24.0
head repository: openai/openai-python
compare: v3.25.0
- 7 commits
- 99 files changed
- 7 contributors
Commits on Oct 2, 2026
-
ci: standardize custom-code budget reporting (#4018)
Aligns the existing custom-code budget tooling with the shared generated templates, including generated-file headers, documentation, and publisher test-fixture formatting. The existing API reference, runtime behavior, public API, and repository-owned budget policy remain unchanged. Validation: SDK formatting and all 59 offline custom-code tests passed locally, including the compiler hash contract. Co-authored-by: apcha-oai <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b6ca5b5 - Browse repository at this point
Copy the full SHA b6ca5b5View commit details -
feat(lib): export type_to_response_format_param publicly (#2993)
Closes #2695 ## Summary - Exports `type_to_response_format_param` from `openai.lib` so users can import it without reaching into private modules Currently users must import from `openai.lib._parsing._completions`, which is an internal path. This adds it to the public `openai.lib` namespace alongside the other publicly exported helpers. ## Test plan - Verified `from openai.lib import type_to_response_format_param` works - No behavior change — just a re-export --------- Co-authored-by: Marcus Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for becc1d2 - Browse repository at this point
Copy the full SHA becc1d2View commit details
Commits on Oct 5, 2026
-
feat(agents): observe local tool failures (#4028)
## Summary Observe local tool failures without sending application exceptions to the model. Previously, logging inside a handler missed argument-validation failures before invocation and serialization failures after it returned: ```python with client.beta.agents.sessions.stream( SESSION_ID, input="Find catalog item A123.", tool_handlers=handlers, ) as stream: stream.until_done() ``` Now attach an optional observer alongside the handlers: ```python def report_tool_error(failure): logger.error( "Tool %s failed during %s (call %s)", failure.tool_name, failure.stage, failure.call_id, ) with client.beta.agents.sessions.stream( SESSION_ID, input="Find catalog item A123.", tool_handlers=handlers, on_tool_error=report_tool_error, ) as stream: stream.until_done() ``` The beta `AgentToolError` carries the original local exception, failure stage, and call identifiers. `AsyncOpenAI` also accepts awaitable observers. Ordinary observer exceptions do not prevent submission of the sanitized tool failure; cancellation and API/stream errors retain their existing propagation. No automatic logging is added.Configuration menu - View commit details
-
Copy full SHA for 95d9645 - Browse repository at this point
Copy the full SHA 95d9645View commit details -
feat(tools): support tool search (defer_loading=true) in typed functi…
…on helpers (#4029) ## Summary Use deferred loading with typed tools without rebuilding their definitions or losing Pydantic argument parsing. Previously, Responses callers could add the option manually, but the compatibility conversion silently dropped it: ```python tool = openai.pydantic_function_tool(LookupItem) tool["function"]["defer_loading"] = True ``` Now use a native Responses factory with either `responses.parse()` or `responses.stream()`: ```python tool = openai.pydantic_responses_function_tool(LookupItem, defer_loading=True) response = client.responses.parse( model=MODEL, input="Find catalog item A123.", tools=[{"type": "tool_search"}, tool], ) # Function calls retain LookupItem instances in parsed_arguments. ``` Agents bindings accept the option directly while keeping the same local handlers: ```python @function_tool(defer_loading=True) def lookup_item(item_id: str) -> str: """Look up a catalog item.""" return catalog.lookup(item_id) tools = [{"type": "tool_search"}, lookup_item.definition] handlers = {lookup_item.name: lookup_item} ``` The Agents `FunctionTool` constructor and Pydantic binding support the same option. Explicit `True`, `False`, and omission are preserved. Existing Responses compatibility conversion also retains added function options; schema normalization and execution behavior stay unchanged.
Configuration menu - View commit details
-
Copy full SHA for eec627f - Browse repository at this point
Copy the full SHA eec627fView commit details -
feat(agents): run local tools during streamed session creation (#4027)
## Summary Run local function tools on the first turn through `sessions.create(stream=True)`. This lets applications create a session with `environment={"type": "none"}`, handle its initial tool calls, and collect the answer in one stream. Before, automatic handlers were only available on a follow-up turn: ```python with client.beta.agents.sessions.stream( session.id, input="Find catalog item A123.", tool_handlers={lookup.name: lookup}, ) as stream: result = stream.get_final_result() ``` Now the same handlers work during creation: ```python with client.beta.agents.sessions.create( agent={"model": MODEL, "tools": [lookup.definition]}, environment={"type": "none"}, input="Find catalog item A123.", stream=True, tool_handlers={lookup.name: lookup}, ) as stream: result = stream.get_final_result() ``` Works with synchronous and asynchronous clients, event iteration, and `output_type`. Both paths share the existing dispatcher and tool-output retry behavior; handlers stay local and are never serialized in the creation request. <!-- Release Please: use the summary only; code examples in the squash commit body can confuse the conventional-commits parser. BEGIN_COMMIT_OVERRIDE feat(agents): run local tools during streamed session creation (#4027) END_COMMIT_OVERRIDE -->Configuration menu - View commit details
-
Copy full SHA for 919b623 - Browse repository at this point
Copy the full SHA 919b623View commit details
Commits on Oct 6, 2026
-
feat(api): add agent turn items and usage source grouping (#4030)
## Summary Adds paginated agent turn-item listing and API source grouping for usage and costs. ## Changes - Add a paginated list method for items in an agent session turn - Support api_source grouping and result fields for costs, completions usage, and web search usage - Support grouping costs by user_id - Add agent session error codes for spend limits and exhausted credits Co-authored-by: dpiet-oai <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bd74c4e - Browse repository at this point
Copy the full SHA bd74c4eView commit details -
Automated Release PR --- ## [3.25.0](v3.24.0...v3.25.0) (2026-10-06) ### Features * **agents:** observe local tool failures ([#4028](#4028)) ([95d9645](95d9645)) * **agents:** run local tools during streamed session creation ([#4027](#4027)) ([919b623](919b623)) * **api:** add agent turn items and usage source grouping ([#4030](#4030)) ([bd74c4e](bd74c4e)) * **lib:** export type_to_response_format_param publicly ([#2993](#2993)) ([becc1d2](becc1d2)) * **tools:** support tool search (defer_loading=true) in typed function helpers ([#4029](#4029)) ([eec627f](eec627f)) --- 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 13fff1b - Browse repository at this point
Copy the full SHA 13fff1bView 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.24.0...v3.25.0