[misc] chore: update openai-agents requirement from <0.19,>=0.18.1 to >=0.18.1,<0.23
Updates the requirements on openai-agents to permit the latest version.
Release notes
Sourced from openai-agents's releases.
v0.22.0
Key Changes
Version 0.22.0 is a minor release because it adds substantial runtime hardening and tightens an existing provider configuration contract. Applications that combine an explicit
openai_clientwithorganizationorprojectmust move those values to theAsyncOpenAIclient.Highlights:
- Redacts terminal function-tool output rejected by agent output guardrails from replayable and persisted SDK state.
- Raises
ModelBehaviorErrorfor non-streaming Responses with terminal statusfailedorincomplete.- Rejects conflicting provider options when
OpenAIProviderreceives an explicit client.- Isolates usage accounting between independent
RunStatecheckpoints while preserving nested-agent aggregation.- Expands agents registered through
handoff(agent)in generated graphs.- Clarifies the existing shallow-copy behavior of
Agent.clone()andRealtimeAgent.clone().What's Changed
- fix(core): redact blocked tool outputs from replay state by
@seratchin openai/openai-agents-python#4507- fix(core): reject ignored explicit-client options for OpenAIProvider by
@sylvesterkaczmarekin openai/openai-agents-python#4497- fix(core): preserve Griffe logger inheritance by
@sylvesterkaczmarekin openai/openai-agents-python#4494- fix(core): reject terminal failed/incomplete responses in non-streaming get_response by
@weike-zhangin https://github.* * fix(core): isolate usage between RunState checkpoints by@chiruu12in openai/openai-agents-python#4479 fix(sandbox): require apply_patch update hunks by@li2631026381-altin openai/openai-agents-python#4470- fix(sandbox): enforce Windows mypy compatibility by
@seratchin openai/openai-agents-python#4499- fix(tracing): respect model-data logging redaction for record_model_error_on_span by
@sylvesterkaczmarekin openai/openai-agents-python#4496- fix(tracing): clean up processors after tracing is disabled by
@sylvesterkaczmarekin openai/openai-agents-python#4502- fix(visualization): expand handoff() targets in agent graphs by
@hsusulin openai/openai-agents-python#4517Documentation & Other Changes
- docs: document v0.21.1 runtime behavior by
@seratchin openai/openai-agents-python#4460- docs: correct Agent.clone list attribute semantics by
@thegoodengineerin openai/openai-agents-python#4474- docs: add testing resources to llms indexes by
@teachershuangin openai/openai-agents-python#4509- ci: align Python version coverage by
@seratchin openai/openai-agents-python#4475- test: use sys.executable instead of tee for the stdio placeholder command by
@ErenAta16in openai/openai-agents-python#4478- fix: keep Codex verification for development sandboxed by
@seratchin openai/openai-agents-python#4508 com/openai/openai-agents-python/pull/4516- release: 0.22.0 by
@seratchin openai/openai-agents-python#4523New Contributors
@li2631026381-altmade their first contribution in openai/openai-agents-python#4470@thegoodengineermade their first contribution in openai/openai-agents-python#4474@teachershuangmade their first contribution in openai/openai-agents-python#4509@weike-zhangmade their first contribution in openai/openai-agents-python#4516@chiruu12made their first contribution in openai/openai-agents-python#4479Full Changelog: https://github.com/openai/openai-agents-python/compare/v0.21.1...v0.22.0
Changelog
Sourced from openai-agents's changelog.
0.22.0
Version 0.22.0 tightens failure handling and data isolation for several existing APIs. Applications that construct
OpenAIProviderwith an explicit client and also passorganizationorprojectto the provider must remove those duplicate arguments.Highlights:
- When an agent-level output guardrail blocks final output produced directly by a terminal function tool, the SDK retains a replay-valid call/output pair only when validated fields permit safe reconstruction. The original
function_call_outputpayload is replaced with the fixed text"Output withheld by an output guardrail."in session history,RunState, and streamed result state, and payload-bearing current-response guardrail metadata is cleared or replaced. If the current response contains reasoning or another unsupported shape, the SDK discards the complete current-response suffix instead. Earlier accepted turns and guardrail results remain available. See Output guardrails.- Non-streaming OpenAI Responses calls now raise
ModelBehaviorErrorwhen the returned response has terminal statusfailedorincomplete, matching the existing streamed terminal-event handling. This applies toOpenAIResponsesModeland the Responses path inAnyLLMModel. See Exceptions.- [
OpenAIProvider][agents.models.openai_provider.OpenAIProvider] now also raisesUserErrorwhenopenai_clientis combined withorganizationorproject. The existing conflicts withapi_key,base_url, andwebsocket_base_urlare unchanged. Configure these values on the explicitAsyncOpenAIclient instead. See API keys and clients.- Each
RunResult.to_state()checkpoint now owns an independent usage snapshot. A resumed result starts with the checkpoint totals and adds its own model calls without mutating the source result or sibling checkpoints. NestedAgent.as_tool()resumes continue to aggregate post-resume usage into the active outer run. See Usage in RunState checkpoints.- Agent visualization now recursively expands the tools, MCP servers, and downstream handoffs of a target registered with
handoff(agent), matching directAgententries in an agent'shandoffslist. See Generating a graph.- The
Agent.clone()andRealtimeAgent.clone()API guidance now states their existing shallow-copy behavior precisely: list attributes that are not overridden remain the same list objects. Pass a new list when the clone must own the container independently. See Cloning/copying agents.0.21.0
Version 0.21.0 requires
openaiv3 and moves the Agents SDK's OpenAI HTTP integrations to HTTPX2. Applications that use the default OpenAI client do not need to change their client setup, but applications that customize the OpenAI HTTP layer may need to migrate transport-facing code.Highlights:
- The required OpenAI dependency is now
openai>=3.0.0,<4. A clean core installation uses HTTPX2 and no longer installs legacyhttpxas a direct dependency.- The default OpenAI provider, Voice provider, Responses WebSocket support, tracing exporter, and provider retry normalization now use HTTPX2. Their existing Agents SDK public configuration and runtime behavior remain unchanged.
- Applications that pass
http_client=toAsyncOpenAIshould migrate custom clients, transports, authentication, event hooks, mock transports, timeout values, URLs, requests, responses, and transport exception handling fromhttpxtohttpx2. Prefer the OpenAI Python SDK'sDefaultAsyncHttpx2Clientwhen the application needs the OpenAI client's defaults plus custom HTTP options. See Custom HTTP clients withopenaiv3.- The Agents SDK does not convert arbitrary legacy HTTPX objects to HTTPX2. The OpenAI Python SDK's temporary legacy-client compatibility path requires an explicit
httpxinstallation and should be treated as a migration bridge.- Local MCP HTTP customization continues to follow the installed MCP package: MCP Python SDK v1 supplies and uses legacy
httpx, while MCP Python SDK v2 useshttpx2. Ordinary MCP connections do not need application changes. See MCP Python SDK v1 and v2.- Public provider-neutral testing utilities now cover Agent model, Sandbox session, Realtime session, and Voice pipeline workflows without provider or process dependencies. See Testing for recipes and guidance on when to keep the real provider adapter or integration boundary.
0.20.0
Version 0.20.0 includes a potentially breaking MCP dependency migration for applications that customize local MCP HTTP transports. It also updates the SDK default model used when an agent or run does not explicitly select one.
Highlights:
- The SDK default model is now
gpt-5.6-lunainstead ofgpt-5.4-mini. The defaultreasoning.effort="none"andverbosity="low"settings are unchanged.- Explicit agent models, run-level model overrides, and the
OPENAI_DEFAULT_MODELenvironment variable continue to take precedence over the SDK default.- Realtime input transcription settings now recognize
gpt-transcribe,gpt-live-transcribe, andgpt-realtime-whisper. For low-latencygpt-live-transcribesessions, nestedaudio.input.transcriptionsettings can supplyprompt,keywords, and multiple expectedlanguages. The OpenAI client version pinned by this SDK supports thedelaylatency/accuracy level only withgpt-realtime-whisper. Usegpt-transcribeover WebSocket for transcription after a committed audio turn or for detected-language output. Settingaudio.input.turn_detection=Noneexplicitly disables automatic turn detection. See Input transcription settings.- Local MCP connections created by the Agents SDK now support MCP Python SDK v2 while retaining v1 compatibility through
mcp>=1.19.0,<3. The Agents SDK adapts ordinary stdio, SSE, and Streamable HTTP connections automatically. With MCP v2 installed, these connections usemcp.Client(mode="auto")to probe the newest supported protocol and fall back to the legacyinitializehandshake for older servers. If dependency resolution selects MCP v2, applications that supply customhttpx.Authobjects orhttpx.AsyncClientfactories must migrate those values tohttpx2, or pinmcp<2to retain the v1 HTTP stack.MCPServerStreamableHttp'sparams["ignore_initialized_notification_failure"] = Trueoption also remains v1-only. See MCP Python SDK v1 and v2 for migration details.- Sandbox mount validation now rejects unsafe credential placement before sandbox or mount-helper side effects. Trusted applications can acknowledge mount-scoped or broad credential exposure for an exact in-container mount path without changing the storage capability tables. These acknowledgements are runtime-only and serialized sandbox state never grants credential authority by itself. At protected mount boundaries, the SDK returns a fresh redacted exception. If the source exception is an exact recognized SDK sandbox error and its approved structured fields validate, the replacement preserves that subtype and the validated safe fields. A recognized
MountConfigErrorcan also retain an SDK-generated safe validation message. Otherwise, the SDK returns a fresh generic redacted error. Provider-controlled or otherwise unapproved messages, command data, notes, context, causes, and source traceback state are not retained. See Mounts and remote storage and Resume from session state.- Retry policies can inspect stable replay-safety facts and explicitly set
RetryDecision(approve_unsafe_replay=True)for a non-streaming request that the provider marked unsafe. This approval does not bypass aborts, emitted streamed output, or separate local-side-effect vetoes such as Programmatic Tool Calling. See Runner-managed retries.- Resumable
RunStateobjects can now stage durable user input withadd_input()before the next model call. Staged input survives serialization, runs through input guardrails, and produces one durable SDK input occurrence across local sessions and server-managed conversations. An explicitly approved unsafe replay can still resend the input to the provider and repeat provider-side work. See Add input before resuming.- Runtime reliability fixes align streamed and non-streamed output-guardrail session persistence, preserve
FunctionToolsubclasses during copying and namespacing, and raise an explicit error for unsupported Chat Completions audio output instead of silently completing an empty stream. TheOpenAIResponsesCompactionSessionwrapper attempts and awaits pre-compaction history recovery before cancellation reaches the caller. AVoicePipelineconsumer now receives transcription-session close failures after a clean run, while an earlier turn failure retains precedence over a later close failure.RunStateround trips now preserve local shell output, acknowledged computer safety checks, default-valued tool output fields, and Pydantic model or dataclass outputs encountered while traversing dictionaries, lists, or tuples. MCP conversion preserves free-form object schemas and image output, and serializes other raw content blocks such as audio and resource blocks as valid JSON text.MCPServerManagerserializes overlapping lifecycle operations and applies finite default timeouts to connection and cleanup. Model replay removes server-ownedcreated_bymetadata from output items before using them as input.0.19.0
This minor release does not introduce a breaking change. The minor version bump reflects a significant new OpenAI Responses feature area: Programmatic Tool Calling.
Highlights:
- Added [
ProgrammaticToolCallingTool][agents.tool.ProgrammaticToolCallingTool], which lets supported OpenAI Responses models generate JavaScript to coordinate tools eligible for Programmatic Tool Calling. It supports per-toolallowed_callers, structured outputs fromFunctionToolinstances, and integration with Runner streaming, guardrails, approvals, sessions, andRunState. See Programmatic Tool Calling for setup and constraints.- Added the public
agents.decoratorsmodule and@toolas a shorter alias for the existing@function_tooldecorator, alongside the existing guardrail decorators.FunctionToolinstances now also support async callable objects.- SDK configuration now consistently accepts either typed settings objects or dictionaries across agents, runs, models, sessions, sandboxes, and voice pipelines, with validation for unknown settings.
... (truncated)
Commits
4df9ecfrelease: 0.22.0 (#4523)fb8fa1bfix(core): isolate usage between RunState checkpoints (#4479)9432f7efix(visualization): expand handoff() targets in agent graphs (#4517)0486792fix(core/extensions): reject terminal failed/incomplete responses in non-stre...36dbc36docs: add testing resources to llms indexes (#4509)ed644fcfix(core): redact blocked tool outputs from replay state (#4507)2c55603test: make stream event ordering deterministic21a1f9bfix: avoid Windows integration bootstrap crashes32e4526ci: change windows ci configuration for stabilityebb746dfix: keep Codex verification for development sandboxed (#4508)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Summary by cubic
Widens the openai-agents dependency range to allow up to v0.22.0. v0.22.0 introduces a breaking change: OpenAIProvider now rejects organization or project when an explicit client is also provided, so move those values onto the AsyncOpenAI client.