What's Changed
⚠️ Compatibility Notes
- Warn with
DeprecatedModelWarningwhen a request targets a model Anthropic or OpenAI has deprecated by @dsfaccini in #14038 - [cache] Surface OpenAI Responses
input_transformationsinprovider_detailsand on the model request span by @dsfaccini in #14056- Raises the
openaifloor from 3.31.0 to 3.50.0 on every extra that installsopenai.
- Raises the
- Add
capabilitiestoAgent.overrideand exportAgentInstructionsandSourcedInstructionby @pydanty in #12551- The private
Agent._override_root_capabilitycontext variable now holds a(capability, injected)tuple. Code that reads it directly needs updating.
- The private
- Add
RealtimeSession.append_voice_instructionsfor GPT-Live's voice model, and a Twilio Media Streams bridge example by @dsfaccini in #14191 - Leave
init=Falseevaluator fields out ofDatasetfiles and schemas, and stopClassVarannotations breakingto_file()by @pydanty in #13355 - Ship nested tool-argument models to Render and Azure Durable Task workers by alias, so aliased fields survive revalidation by @dsfaccini in #13929
- Rename
$refs under every JSON schema keyword inmerge_json_schema_defs, and keepTestModelarguments valid for their schemas by @dsfaccini in #13993 - Downscale images
Coderreads to at most 1024 pixels on the longest side, with opt-inFileSystem(max_image_side=...)by @mpfaffenberger in #14196- The
coderextra now installspillow>=12.3.0.
- The
- Drop the unified settings Claude, Gemini and Grok models reject instead of sending them by @DouweM in #12426
- A
FallbackModelthat relied on the 400 to reach a later model now stays on the first model without the setting. To keep the setting, list a model that supports it first.
- A
- Raise the
boxdextra to 0.3 and swap the/sandbox boxdGitHub token into request headers only by @adtyavrdhn in #14225pydantic-ai-harness[boxd]now requiresboxd>=0.3.3,<0.4. Code that calls 0.2-only boxd APIs directly needs updating.
🚀 Features
- Warn with
DeprecatedModelWarningwhen a request targets a model Anthropic or OpenAI has deprecated by @dsfaccini in #14038 - Let
SubAgentspass a delegate's deferred tool calls to the caller and resume it once they are answered by @mpfaffenberger in #14115 - Allow a custom voice object for
openai_voiceon GPT-Live by @pydanty in #14165 - [cache] Surface OpenAI Responses
input_transformationsinprovider_detailsand on the model request span by @dsfaccini in #14056 - Add
capabilitiestoAgent.overrideand exportAgentInstructionsandSourcedInstructionby @pydanty in #12551 - Add thinking profiles for the Nemotron, Inkling, MiMo, Step, Hy and Ling families on OpenAI-compatible gateways by @pydanty in #12370
- Add
RealtimeSession.append_voice_instructionsfor GPT-Live's voice model, and a Twilio Media Streams bridge example by @dsfaccini in #14191 - Add
E2BSandbox(idle_timeout=...)so a busy run is not paused bysandbox_timeoutby @adtyavrdhn in #11954
🐛 Bug Fixes
- Inline
+yamlstructured-suffixBinaryContentas text inOpenAIChatModelandMistralModelby @pydanty in #12832 - Leave
init=Falseevaluator fields out ofDatasetfiles and schemas, and stopClassVarannotations breakingto_file()by @pydanty in #13355 - Handle deeply nested JSON and oversized integers like invalid JSON in
AGUIAdapter,VercelAIAdapterandArgumentCorrectnessby @dsfaccini in #13952 - Make
PixeltableMemoryStorework on Pixeltable 0.7.25, which renamedRowCountStats.upd_rowstoupdated_rowsby @dsfaccini in #13997 - Stop
Shellcalls on aWindowsWorkspacefailing withPermission deniedon their ownstatus.jsonby @dsfaccini in #13995 - Bracket an IPv6 literal in the
Hostheader of SSRF-protected URL downloads on the default port by @dsfaccini in #13905 - Ship nested tool-argument models to Render and Azure Durable Task workers by alias, so aliased fields survive revalidation by @dsfaccini in #13929
- Start
WindowsWorkspaceBackendPowerShell scripts from a temporary file instead of-EncodedCommandby @mpfaffenberger in #14028 - Rename
$refs under every JSON schema keyword inmerge_json_schema_defs, and keepTestModelarguments valid for their schemas by @dsfaccini in #13993 - Default
claiandclai webtoopenai:gpt-6.1-solinstead ofopenai:gpt-5by @dsfaccini in #14042 - Write out
$defs$refs undernot,if/then/elseand other keywords the inlining walk skips, instead of leaving them dangling by @dsfaccini in #14044 - Check the OpenAI conversation before
openai_conversation_idtrims history through a response whose stream dropped by @dsfaccini in #14055 - Emit the same online evaluation events on logfire 5 and 6 by @dsfaccini in #14076
- Log only the origin of the
gh-awengine's base URL, so credentials inPAI_BASE_URLstay out of run logs by @dsfaccini in #14081 - Remove a cancelled
SpritesSandboxcommand's stderr capture file over a slow exec by @adtyavrdhn in #13365 - Wait for boxd to list a machine
BoxdSandboxBackendjust created instead of reporting it missing by @dsfaccini in #14119 - Fix
OpenAIResponsesModelsending rejected item IDs when replaying client-executed tool search by @pydanty in #14052 - Raise
IncompleteToolCallfor cut-off deferred tool calls by @pydanty in #14125 - Redact
PlaywrightBrowserCDP endpoint credentials wherever an attach error repeats them by @dsfaccini in #14200 - Retry an
AdvisororSubAgentschild on anopenai-codex:oropenai-chatgpt:model without the up-front token count by @dsfaccini in #14197 - Expand MCP config env vars in linear time and compare any-length AG-UI
protocolVersionnumbers by @dsfaccini in #14209 - Keep the latest workspace response through harness compaction, so a run does not leave its workspace by @adtyavrdhn in #13718
- Complete
safe_download's blocked-range table against IANA's special-purpose registries with192.88.99.2/32and2001::/23by @dsfaccini in #14212 - Set
run_idon a request resumed frommessage_historybeforebefore_model_requesthooks run by @adtyavrdhn in #13369 - Support
gateway/doubleword:<model>model strings by @adtyavrdhn in #14222 - Enable
NativeOutputformoonshotai/kimi-k3andmoonshotai/kimi-k3.1-proonOpenRouterProviderby @dsfaccini in #14239 - Convert
web_fetchpages whosecolspan,<ol start>or<hN>levelint()rejects instead of ending the run withValueErrorby @dsfaccini in #14198 - Downscale images
Coderreads to at most 1024 pixels on the longest side, with opt-inFileSystem(max_image_side=...)by @mpfaffenberger in #14196 - List the supported tools in sorted order in the unsupported native tool
UserErrorby @dsfaccini in #14252 - Convert
web_fetchpages with a decimal character reference longer thanint()parses instead of ending the run withValueErrorby @dsfaccini in #14255 - Fix
thinking='minimal'sending athinking_budgetthatgemini-2.5-flash-literejects by @dsfaccini in #14208 - Drop the unified settings Claude, Gemini and Grok models reject instead of sending them by @DouweM in #12426
- Treat
extra_body=Noneas absent onOpenRouterModel,CerebrasModel,SnowflakeModelandZaiModelby @dsfaccini in #14274 - Run output functions and validators once when a
run_streamoutput isNoneby @dsfaccini in #14273 - [tool-search] Omit the
tsc_*item ID whenOpenAIResponsesModelreplays a client tool search as afunction_callby @dsfaccini in #14275
📦 Dependencies
- Raise the
boxdextra to 0.3 and swap the/sandbox boxdGitHub token into request headers only by @adtyavrdhn in #14225
Full Changelog: v2.71.0...v2.73.0