CapabilityWire
// event · sdk

OpenAI Python SDK 3.25.0 adds agent tool-failure observability and streamed local tool runs

sdk
vendor: openaipublished: 6d agoconfidence: 0.90id: 872c9bb8-0526-40e4-b474-ca499c1cf30b

The OpenAI Python SDK 3.25.0 extends its agents surface: local tool failures are now observable, local tools can run during streamed session creation, and the API adds agent turn items plus usage source grouping. Typed function helpers also support `defer_loading=True` tool search, and `type_to_response_format_param` is now exported publicly.

capability delta

An agent can now observe local tool failures, run local tools during streamed session creation, group usage by source, and use deferred tool-search loading via typed function helpers in the OpenAI Python SDK.

// install
pip install openai==3.25.0
pypi · openai @ 3.25.0
// example
python
from openai import OpenAI
from openai.lib.agents import tool

client = OpenAI()

@tool(defer_loading=True)  # new: supported in typed function helpers
def search_docs(query: str) -> str:
    return f"results for {query}"

# Run local tools during a streamed agent session
with client.agents.sessions.stream(
    model="gpt-5",
    tools=[search_docs],
    input="Find docs about retries",
) as stream:
    for event in stream:
        # New: local tool failures are surfaced as observable events
        if event.type == "tool.failed":
            print("tool error:", event.error)
        elif event.type == "turn.item":
            print(event.item)
// links
openaipythonagentstool-usestreamingsdk
source: github_release · https://github.com/openai/openai-python/releases/tag/v3.25.0