pypi pydantic-ai 2.73.0
v2.73.0 (2026-11-23)

one hour ago

What's Changed

⚠️ Compatibility Notes

  • Warn with DeprecatedModelWarning when a request targets a model Anthropic or OpenAI has deprecated by @dsfaccini in #14038
  • [cache] Surface OpenAI Responses input_transformations in provider_details and on the model request span by @dsfaccini in #14056
    • Raises the openai floor from 3.31.0 to 3.50.0 on every extra that installs openai.
  • Add capabilities to Agent.override and export AgentInstructions and SourcedInstruction by @pydanty in #12551
    • The private Agent._override_root_capability context variable now holds a (capability, injected) tuple. Code that reads it directly needs updating.
  • Add RealtimeSession.append_voice_instructions for GPT-Live's voice model, and a Twilio Media Streams bridge example by @dsfaccini in #14191
  • Leave init=False evaluator fields out of Dataset files and schemas, and stop ClassVar annotations breaking to_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 in merge_json_schema_defs, and keep TestModel arguments valid for their schemas by @dsfaccini in #13993
  • Downscale images Coder reads to at most 1024 pixels on the longest side, with opt-in FileSystem(max_image_side=...) by @mpfaffenberger in #14196
    • The coder extra now installs pillow>=12.3.0.
  • Drop the unified settings Claude, Gemini and Grok models reject instead of sending them by @DouweM in #12426
    • A FallbackModel that 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.
  • Raise the boxd extra to 0.3 and swap the /sandbox boxd GitHub token into request headers only by @adtyavrdhn in #14225
    • pydantic-ai-harness[boxd] now requires boxd>=0.3.3,<0.4. Code that calls 0.2-only boxd APIs directly needs updating.

🚀 Features

  • Warn with DeprecatedModelWarning when a request targets a model Anthropic or OpenAI has deprecated by @dsfaccini in #14038
  • Let SubAgents pass 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_voice on GPT-Live by @pydanty in #14165
  • [cache] Surface OpenAI Responses input_transformations in provider_details and on the model request span by @dsfaccini in #14056
  • Add capabilities to Agent.override and export AgentInstructions and SourcedInstruction by @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_instructions for 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 by sandbox_timeout by @adtyavrdhn in #11954

🐛 Bug Fixes

  • Inline +yaml structured-suffix BinaryContent as text in OpenAIChatModel and MistralModel by @pydanty in #12832
  • Leave init=False evaluator fields out of Dataset files and schemas, and stop ClassVar annotations breaking to_file() by @pydanty in #13355
  • Handle deeply nested JSON and oversized integers like invalid JSON in AGUIAdapter, VercelAIAdapter and ArgumentCorrectness by @dsfaccini in #13952
  • Make PixeltableMemoryStore work on Pixeltable 0.7.25, which renamed RowCountStats.upd_rows to updated_rows by @dsfaccini in #13997
  • Stop Shell calls on a WindowsWorkspace failing with Permission denied on their own status.json by @dsfaccini in #13995
  • Bracket an IPv6 literal in the Host header 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 WindowsWorkspaceBackend PowerShell scripts from a temporary file instead of -EncodedCommand by @mpfaffenberger in #14028
  • Rename $refs under every JSON schema keyword in merge_json_schema_defs, and keep TestModel arguments valid for their schemas by @dsfaccini in #13993
  • Default clai and clai web to openai:gpt-6.1-sol instead of openai:gpt-5 by @dsfaccini in #14042
  • Write out $defs $refs under not, if/then/else and other keywords the inlining walk skips, instead of leaving them dangling by @dsfaccini in #14044
  • Check the OpenAI conversation before openai_conversation_id trims 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-aw engine's base URL, so credentials in PAI_BASE_URL stay out of run logs by @dsfaccini in #14081
  • Remove a cancelled SpritesSandbox command's stderr capture file over a slow exec by @adtyavrdhn in #13365
  • Wait for boxd to list a machine BoxdSandboxBackend just created instead of reporting it missing by @dsfaccini in #14119
  • Fix OpenAIResponsesModel sending rejected item IDs when replaying client-executed tool search by @pydanty in #14052
  • Raise IncompleteToolCall for cut-off deferred tool calls by @pydanty in #14125
  • Redact PlaywrightBrowser CDP endpoint credentials wherever an attach error repeats them by @dsfaccini in #14200
  • Retry an Advisor or SubAgents child on an openai-codex: or openai-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 protocolVersion numbers 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 with 192.88.99.2/32 and 2001::/23 by @dsfaccini in #14212
  • Set run_id on a request resumed from message_history before before_model_request hooks run by @adtyavrdhn in #13369
  • Support gateway/doubleword:<model> model strings by @adtyavrdhn in #14222
  • Enable NativeOutput for moonshotai/kimi-k3 and moonshotai/kimi-k3.1-pro on OpenRouterProvider by @dsfaccini in #14239
  • Convert web_fetch pages whose colspan, <ol start> or <hN> level int() rejects instead of ending the run with ValueError by @dsfaccini in #14198
  • Downscale images Coder reads to at most 1024 pixels on the longest side, with opt-in FileSystem(max_image_side=...) by @mpfaffenberger in #14196
  • List the supported tools in sorted order in the unsupported native tool UserError by @dsfaccini in #14252
  • Convert web_fetch pages with a decimal character reference longer than int() parses instead of ending the run with ValueError by @dsfaccini in #14255
  • Fix thinking='minimal' sending a thinking_budget that gemini-2.5-flash-lite rejects 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=None as absent on OpenRouterModel, CerebrasModel, SnowflakeModel and ZaiModel by @dsfaccini in #14274
  • Run output functions and validators once when a run_stream output is None by @dsfaccini in #14273
  • [tool-search] Omit the tsc_* item ID when OpenAIResponsesModel replays a client tool search as a function_call by @dsfaccini in #14275

📦 Dependencies

  • Raise the boxd extra to 0.3 and swap the /sandbox boxd GitHub token into request headers only by @adtyavrdhn in #14225

Full Changelog: v2.71.0...v2.73.0

Don't miss a new pydantic-ai release

NewReleases is sending notifications on new releases.