@openai/agents
0.22.0 · 12 Nov 2026MIT2.5M / weekRepositoryHomepagenpmAtom feed
0.22.0 is the newest release of 0.16.x.
In short
3 new14 fixed2 internal
Release note
Key Changes
Deterministic SDK testing utilities
This release adds provider-neutral testing utilities through @openai/agents/testing, @openai/agents-core/testing, @openai/agents/realtime/testing, and @openai/agents-realtime/testing. ScriptedModel, scriptedSandboxSession(), and ScriptedRealtimeTransport let applications exercise runner, sandbox, and Realtime workflows without live model, sandbox, WebRTC, or WebSocket dependencies. Existing runtime entry points and defaults remain unchanged.
Standard Schema inputs and outputs
Tools, handoffs, and agent structured outputs now accept supported Standard Schema values alongside Zod and raw JSON Schema. The schema must provide synchronous ~standard.validate behavior plus ~standard.jsonSchema.input() and ~standard.jsonSchema.output(), and generated schemas must have an object root. Standard Schema function-tool parameters require strict mode; use a Zod schema, raw JSON Schema, or application-side validation for unsupported cases.
Safer run, provider, and Realtime behavior
CallModelInputFilter can opt into stable prepared-item identity with preserveInputIdentity = true; default filters continue to receive deep copies, and the SDK does not freeze opted-in items. The release also tightens interruption snapshots, max-turn finalization, invalid tool-output redaction, Responses parallel-tool-call forwarding, Chat Completions reasoning placement, Realtime audio-rate fallback, and unsupported assistant-audio history replay handling.
What's Changed
Add scripted testing utilities
fix: detach Manifest snapshots in scripted sandbox calls
fix: detach scripted model stream snapshots
Support Standard Schema inputs and agent outputs
fix: avoid redundant Standard Schema validation
Preserve model input identity
core: Isolate interruption result arrays
core: Align Responses parallel tool calls with tools
core: Reject partially matched stacked diff anchors
core: Apply stacked diff anchors sequentially
core: Redact invalid typed tool output diagnostics
core: Detach RunState interruption snapshots
core: Finalize max-turn handler session output
mcp: Keep cached tool arrays private
chat-completions: Keep Chat Completions reasoning on its assistant message
sandbox: Snapshot sandbox HTTP event sink headers
sandbox: Describe granted view_image paths
realtime: Reject unsupported audio history replay
realtime: Handle non-finite audio rates
extensions: Forward strict settings through the AI SDK
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.