github pydantic/pydantic-ai v2.79.0
v2.79.0 (2026-12-04)

36 minutes ago

What's Changed

🚀 Features

  • Add FileSystem(max_media_bytes=) to set the largest image, PDF or video read_file returns as the file itself by @DouweM in #15475
  • Add ConvertFiles, a harness capability that converts images a model can't read into JPEG or PNG by @DouweM in #15514
  • Load user-global instruction files via RepoContext.extra_sources and Pax repo_context.global_file_paths by @mpfaffenberger in #15906
  • Combine two WrapUpAtLimits on one agent into one with a default id by @DouweM in #15501
  • Emit a DisplayRestartedEvent from ComputerUse when the display restarts by @DouweM in #15597
  • Add CapabilityNamespace to resolve agent spec capability names from module:attribute targets, entry points and modules by @DouweM in #14816
  • Turn on DetectLoops and WrapUpAtLimits by default in Coder, with off switches by @DouweM in #15601
  • Add AbstractCapability.durable_unsupported_reason and refuse unsupported capabilities wherever they enter a durable run by @DouweM in #15976
  • Let HandleDeferredToolCalls token handlers and AskUser wait durably in a pgtask task by @DouweM in #15531
  • Add ToolAnnotations behavior facts (read_only, destructive, idempotent, open_world, long_running) to ToolDefinition by @DouweM in #6344
  • Make OpenAIChatModel's response validation hooks public so applications can repair non-conforming responses by @DouweM in #15518
  • Support NativeOutput and JSON mode on SambaNovaProvider, best-effort by @DouweM in #15552
  • Add opt-in CDPDriver browser_drive tool and visual overlay to CDPBrowser by @mpfaffenberger in #15990
  • Add DynamicOutput capability for runtime output schema authoring and activation by @mpfaffenberger in #16098
  • Add Timers deferred wake-up capability and default Pax plugin by @mpfaffenberger in #15770
  • Accept context_length alongside max_model_len in Pax vllm model discovery by @mpfaffenberger in #16160
  • Trim Pax's folder trust prompt to one question and one detail line by @mpfaffenberger in #16116
  • Show prompt-cache miss notices in Pax using Harness WarnOnCacheBusts by @mpfaffenberger in #16115
  • Add PlanMode capability and plan mode (/plan, Shift+Tab) to Pax by @mpfaffenberger in #16112
  • Add interactive /fork session branching at a chosen turn in Pax by @mpfaffenberger in #16102
  • Add repo-scoped session recall and /reflect command to Pax by @mpfaffenberger in #16096
  • Add ergonomic Pax plugin primitives (PluginHost.warn(), KeySlot, OAuthSignIn.for_run(), Command.subcommands()) by @mpfaffenberger in #15762
  • Migrate Pax .clai/ paths, CLAI_* env vars, and pydantic_clai2_plugins namespace to .pax/, PAX_*, and pax_plugins by @mpfaffenberger in #15761
  • Add ModelFieldSource for Pydantic-backed Pax Plugin.settings_menu by @mpfaffenberger in #15760
  • Curate pydantic_ai_pax.plugins.__all__, drop pre-V1 deprecations, and scope the API-compat gate by @mpfaffenberger in #15759
  • Add class-level Plugin.requires and Plugin.current_settings() by @mpfaffenberger in #15758
  • Make auto the default permission mode in Pax by @mpfaffenberger in #15753
  • Tint Pax's default-theme prompts from the terminal's reported background by @DouweM in #15532
  • Let Pax sub-agents use any saved /model model, chosen by the model per delegation by @DouweM in #15528
  • Load a YAML or JSON agent spec file with pax --agent and refuse agents that need deps at launch by @DouweM in #15336
  • Add a terminal_status built-in to Pax that reports session status through OSC 7501 by @mpfaffenberger in #15297
  • Add an opt-in require_verification setting to the Pax coder plugin over harness RequireVerification by @DouweM in #15051
  • Add a default-on detect_loops built-in to Pax that nudges a model stuck repeating itself by @DouweM in #15043
  • Add a planning built-in to Pax that keeps a todo plan per conversation by @DouweM in #15037
  • Make /update in a pydantic-clai2 uv tool install pydantic-ai-pax as its own tool and restart as pax by @DouweM in #14866
  • Hide scripted Claude Code runs from the Pax session picker and mark imported sessions by @DouweM in #14730
  • Serve an agent of your own in the pax --web UI with --agent by @DouweM in #14706
  • Add pax --minimal, a sessions.import_external setting, and a startup line naming plugins Pax doesn't ship by @DouweM in #14461
  • Add Ctrl+N to steer the oldest queued prompt during an active pax run by @pydanty in #14152

🐛 Bug Fixes

  • Keep Shell jobs across Temporal activity retries and end the foreground wait before the activity times out by @DouweM in #15403
  • Stop a non-streaming clai turn from naming an unnamed agent agent by @dsfaccini in #15859
  • Load settled delegation tasks from an index instead of parsing every saved history when DelegationTasks opens by @DouweM in #15417
  • Stop SummarizingCompaction from cutting tool results to 500 characters by default by @DouweM in #12113
  • Fail a VercelAIAdapter request that gives one toolCallId two different approval answers, instead of applying the last by @dsfaccini in #15861
  • Keep scope on a dynamic SystemPromptPart when it's re-evaluated by @dsfaccini in #15884
  • Send a cut-off OpenAI Responses stream's unfinished reasoning as text, so the next request doesn't fail with a 404 by @dsfaccini in #15794
  • Stop BedrockConverseModel from sending botocore retries after a request was cancelled or timed out by @dsfaccini in #15894
  • Keep the timing of a failed attempt that raised an error across a durable replay by @DouweM in #15411
  • Run a nested capability's durable operation as itself when a registered capability shares its id by @DouweM in #15347
  • Keep the history changes of a durable before_model_request or prepare_model_request hook, as a plain run does by @DouweM in #15402
  • Send SecretStr, SecretBytes and Secret[T] function tool arguments to Temporal, Render Workflows and Azure Durable Task workers with their values by @DouweM in #15809
  • Fail a durable run on a UserError from a CodeMode sandboxed call instead of sending the model a retry by @DouweM in #15829
  • Send BedrockEmbeddingModel Cohere inputs of more than 96 texts as several InvokeModel requests by @dsfaccini in #15901
  • Set video_metadata only for video parts in GoogleModel by @Jvxoq in #12929
  • Refuse Peers, IPythonCodeMode and per-run unsupported capabilities in the deprecated TemporalAgent, DBOSAgent and PrefectAgent by @DouweM in #15736
  • Save a finished delegation task's usage on its record so Pax doesn't parse its history to show it by @DouweM in #15579
  • Attach run state to cancellation raised during run_stream_events() teardown by @pydanty in #15833
  • Keep a Temporal stream's partial response in the conversation when the run is cancelled by @DouweM in #14460
  • Report a missing positive_key or ConfusionMatrixEvaluator key even when the report has no cases by @adtyavrdhn in #13372
  • Return the exit code from DockerContainerBackend.run when a command signals its own process group by @DouweM in #15008
  • Accept rawInput/inputEncoding on input-streaming tool parts in the Vercel AI adapter by @pydanty in #15725
  • Replay a durable FallbackModel stream against the output mode of the model that answered by @DouweM in #14766
  • Inherit the run's data-handling settings in SummarizingCompaction summary requests by @mpfaffenberger in #16008
  • Redact binary content in nested tool return parts by @pydanty in #15306
  • Raise failed AWS credential refreshes as ModelConnectionError on Anthropic-on-Bedrock and Bedrock Mantle, so FallbackModel falls back by @dsfaccini in #15896
  • Stop BedrockEmbeddingModel from sending botocore retries after embed is cancelled or times out by @dsfaccini in #15970
  • Narrow the window in which racing threads overwrite an unnamed agent's inferred name by @dsfaccini in #15860
  • Send AG-UI events in ToolReturn.metadata that a durable engine journaled as JSON by @dsfaccini in #15902
  • Raise UserError when an on_model_request_error hook returns something other than a ModelResponse by @dsfaccini in #16051
  • Return the wrap_model_request replacement instead of raising NameError in streamed runs under asyncio.eager_task_factory by @dsfaccini in #16069
  • Mark page-changing PlaywrightBrowserToolset and shared BrowserUseToolset tools as sequential=True by @mpfaffenberger in #16013
  • Match words in any script in local keyword tool search instead of treating non-ASCII queries as empty by @pydanty in #15844
  • Honor _identifier on BinaryContent, BinaryImage and BinaryAudio by @pydanty in #14059
  • Raise UserError when the native or local tool of WebFetch, WebSearch, XSearch or MCP lacks a restriction set on the capability by @dsfaccini in #15684
  • Classify non-retryable errors once in pydantic_ai.durable_exec so every durable engine stops retrying them by @DouweM in #15407
  • Record tools a capability's get_wrapper_toolset adds under TemporalDurability and PrefectDurability by @DouweM in #16077
  • Render TrajectoryJudge transcripts as JSON by @mpfaffenberger in #16093
  • Support SubAgents(include_self=True) alongside other delegates on every durable engine by @mpfaffenberger in #16095
  • Carry ctx.enqueue() and ctx.emit() calls made inside a durable unit in its recorded result, so replays re-apply them by @DouweM in #15404
  • Give the PydanticAIDocs and BrowserUse toolsets an id, as Temporal requires by @DouweM in #15396
  • Deliver buffered events to event_stream_handler and on_event listeners when a Temporal run continues as new by @DouweM in #14751
  • Send a file in a tuple tool return as a file, as a list return does by @pydanty in #15647
  • Give a tool call deferred while running a result when the run ends on a final result by @DouweM in #14380
  • Stop Shell(persist_cwd=True) from adding 7 workspace round trips to every run_command, by reading and saving the directory inside the command's own exec by @adtyavrdhn in #13844
  • Skip recording the plan again when a plan tool ran inside CodeMode or IPythonCodeMode's run_code by @DouweM in #15530
  • Record time to first chunk on the chat span as gen_ai.response.time_to_first_chunk, keeping the deprecated metric-named attribute by @DouweM in #15453
  • Stop HuggingFaceModel raising after every response on the default Hugging Face route by @DouweM in #15539
  • Fall back from and retry empty finish_reason='error' responses in ModelFallback and RetryOnModelErrors by @DouweM in #14543
  • Send a late native tool result ahead of the carried-thinking turn on Anthropic by @DouweM in #15378
  • Set usage.cost from the cost OpenRouter reports on OpenRouterModel by @DouweM in #15335
  • Drop a CachePoint in MCPSamplingModel prompts instead of raising by @DouweM in #15485
  • Raise ModelContextWindowExceededError for a Mistral 1300 that leaves the token budget untouched by @DouweM in #15554
  • Drop Claude sampling settings that conflict with thinking or top_p set in extra_body by @DouweM in #15959
  • Keep a continued response that crosses a usage limit in the run's history by @DouweM in #15467
  • Show Pax's selected autocomplete suggestion in the theme accent color by @mpfaffenberger in #16239
  • Use Tab instead of Ctrl+S for model settings in /model add by @mpfaffenberger in #16238
  • Restrict Pax code mode workspace mount when Permissions rules or approval wrappers gate file tools by @mpfaffenberger in #16092
  • Pass -c core.fsmonitor=false and disable config-driven helpers in Pax's automatic Git calls by @mpfaffenberger in #16091
  • Anchor a Pax project MCP server's relative command to its project folder by @mpfaffenberger in #16090
  • Start git and gh from PATH, not the working directory, in Pax on Windows by @dsfaccini in #16082
  • Stop calling a Claude Code sub-agent that reported stopped in Pax's import note after a compaction by @DouweM in #15987
  • Count compaction and session naming requests in Pax /cost and /usage by @mpfaffenberger in #15908
  • Apply settings saved with /config set when Pax runs /reload by @dsfaccini in #15610
  • Return freed memory to the OS after each Pax turn and resume by @DouweM in #15574
  • List built-in, drop-in and project plugins in pax plugins list, not only saved ones by @DouweM in #15516
  • Show why a plugin launched with pax -x failed to load in /plugins and the web panel by @DouweM in #15487
  • Keep a finished Pax turn when sessions.db is locked as it ends, and wait 30 s for SqliteSessionStore saves by @DouweM in #15405
  • Attach Pax clipboard images from Windows Terminal empty pastes and from WSL through powershell.exe by @mpfaffenberger in #15194
  • Refuse /update in Pax once another process has replaced its install, and give the --resume command by @DouweM in #14844
  • Wrap typed Pax prompt text at word boundaries by @pydanty in #14713
  • Run a Pax model without an account on the default account unless accounts.pool is on by @DouweM in #14693

⚠️ Compatibility Notes

  • Load user-global instruction files via RepoContext.extra_sources and Pax repo_context.global_file_paths by @mpfaffenberger in #15906
  • Combine two WrapUpAtLimits on one agent into one with a default id by @DouweM in #15501
  • Turn on DetectLoops and WrapUpAtLimits by default in Coder, with off switches by @DouweM in #15601
  • Add AbstractCapability.durable_unsupported_reason and refuse unsupported capabilities wherever they enter a durable run by @DouweM in #15976
  • Add Timers deferred wake-up capability and default Pax plugin by @mpfaffenberger in #15770
  • Show prompt-cache miss notices in Pax using Harness WarnOnCacheBusts by @mpfaffenberger in #16115
  • Migrate Pax .clai/ paths, CLAI_* env vars, and pydantic_clai2_plugins namespace to .pax/, PAX_*, and pax_plugins by @mpfaffenberger in #15761
  • Curate pydantic_ai_pax.plugins.__all__, drop pre-V1 deprecations, and scope the API-compat gate by @mpfaffenberger in #15759
  • Make auto the default permission mode in Pax by @mpfaffenberger in #15753
  • Add a terminal_status built-in to Pax that reports session status through OSC 7501 by @mpfaffenberger in #15297
  • Add an opt-in require_verification setting to the Pax coder plugin over harness RequireVerification by @DouweM in #15051
  • Add a default-on detect_loops built-in to Pax that nudges a model stuck repeating itself by @DouweM in #15043
  • Add a planning built-in to Pax that keeps a todo plan per conversation by @DouweM in #15037
  • Stop SummarizingCompaction from cutting tool results to 500 characters by default by @DouweM in #12113
  • Fail a VercelAIAdapter request that gives one toolCallId two different approval answers, instead of applying the last by @dsfaccini in #15861
  • Run a nested capability's durable operation as itself when a registered capability shares its id by @DouweM in #15347
  • Replay a durable FallbackModel stream against the output mode of the model that answered by @DouweM in #14766
  • Raise failed AWS credential refreshes as ModelConnectionError on Anthropic-on-Bedrock and Bedrock Mantle, so FallbackModel falls back by @dsfaccini in #15896
  • Raise UserError when the native or local tool of WebFetch, WebSearch, XSearch or MCP lacks a restriction set on the capability by @dsfaccini in #15684
  • Classify non-retryable errors once in pydantic_ai.durable_exec so every durable engine stops retrying them by @DouweM in #15407
  • Record tools a capability's get_wrapper_toolset adds under TemporalDurability and PrefectDurability by @DouweM in #16077
  • Support SubAgents(include_self=True) alongside other delegates on every durable engine by @mpfaffenberger in #16095
  • Give a tool call deferred while running a result when the run ends on a final result by @DouweM in #14380
  • Fall back from and retry empty finish_reason='error' responses in ModelFallback and RetryOnModelErrors by @DouweM in #14543
  • Start git and gh from PATH, not the working directory, in Pax on Windows by @dsfaccini in #16082
  • Count compaction and session naming requests in Pax /cost and /usage by @mpfaffenberger in #15908
  • Run a Pax model without an account on the default account unless accounts.pool is on by @DouweM in #14693
  • Make Pydantic AI Harness capability constructors keyword-only, except their subject by @DouweM in #15611
  • Load a YAML or JSON agent spec file with pax --agent and refuse agents that need deps at launch by @DouweM in #15336
  • Refuse Peers, IPythonCodeMode and per-run unsupported capabilities in the deprecated TemporalAgent, DBOSAgent and PrefectAgent by @DouweM in #15736
  • Carry ctx.enqueue() and ctx.emit() calls made inside a durable unit in its recorded result, so replays re-apply them by @DouweM in #15404

New Contributors

Full Changelog: v2.78.0...v2.79.0

Don't miss a new pydantic-ai release

NewReleases is sending notifications on new releases.