NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #636 most downloaded on PyPI
Graph and state machine library
Latest stable
2.69.0
Last release 3 days ago
17 Nov 2026
Ships on a steady schedule
a new release about every 1 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
2 years old
340 releases · first in 2025
Drag across the ruler to compare, or tap a release to open it.
Deprecate RetryPromptPart in favor of ToolReturnPart(outcome='retried') and RetryFeedbackPart by @dsfaccini in https://github.com/pydantic/pydantic-ai…
<!-- Release notes generated using configuration in .github/release.yml at 7bccbb8096be8249ebf0ed1d8f01a6fae7b20acb -->
ModelRateLimitError from embedding models by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10804usage_limits, deadline, run_id and conversation_id to ModelSelectionContext by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10856BedrockConverseModel's maxTokens to Claude's maximum output, streaming such requests behind the scenes by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10845RetryPromptPart in favor of ToolReturnPart(outcome='retried') and RetryFeedbackPart by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/8094<harness_data> instead of user messages in SummarizingCompaction by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10833AskUser, ConversationSearch, Macroscope, ManagedPrompt, PlaywrightBrowser and PydanticAIDocs a stable default id, and append ManagedPrompt version changes by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10904MCP capability's default id from the server URL's hostname only, and reject two servers on one host without explicit ids by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10807MetadataMemoryStore and Memory(write_metadata=...) by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10892InstructionPart passed to a run's instructions opt into on_change='append', keyed run:<name> by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10789SummarizingCompaction(keep_user_messages=True) copies recognized after their request is merged by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10914instructions from untrusted history in sanitize_messages and server-managed UI adapters by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10897datetime and UUID, to the model unquoted so restored histories match the first run by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10488settings and profile in model equality and Model repr by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/9474OpenAIDecisionsProvider and let OpenAIDecisionsModel take OpenAIProvider by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10951ToolAvailabilityDeltaPart by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9405send(text) runs the agent's tools by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10960StepPersistence snapshots, and fix SqliteMediaStore, DiskMediaStore, MongoMediaStore and S3MediaStore edge cases by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10834Advisor capabilities by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10726TextContent.metadata from user prompts in sanitize_messages by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10943ModelConnectionError and ModelTimeoutError for xAI gRPC connection failures and client timeouts by @DouweM in https://github.com/pydantic/pydantic-ai/pull/11080system_prompt and seeded history's system prompts to realtime sessions by @DouweM in https://github.com/pydantic/pydantic-ai/pull/11055SubAgents background task output as framed <task_output> data instead of in a SystemPromptPart by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10550BrowserUse secrets on allowlisted sites and out of tool results, and fix allowlist and file:// gaps by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10771FileSystem denied and read-only patterns case-insensitively, protect .git files, and bound reads and Python regex searches by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10825GitHub tools on readOnlyHint under read_only=True, reject 'oauth', and deprecate plain http:// URLs by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10815'max' to unified thinking effort levels by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10920DockerSandbox harness capability that runs the workspace in a local Docker or Podman container by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9341SmolSandboxBackend use a VM the application already has by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/10882in_response_to_ids by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10792ModelSelectionContext by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10836ToolDefinition.unless_tool_kind and RunContext.tool_name_for_kind, and give instructions the current step's tools by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10673supports_audio_file_input and supported_document_media_types profile flags by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10476gh-aw copilot/ models on the github-copilot: model and declare detection-engine: copilot by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9318base_url and MOONSHOTAI_BASE_URL support to MoonshotAIProvider by @yanlinf in https://github.com/pydantic/pydantic-ai/pull/10177FileSystem by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9410RelevanceCompaction, which keeps, reduces or drops each older history step by a judge model's ranking by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/11026SmartSearch harness capability for plain-English code search with a pluggable judge model by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/8977OpenAIDecisionsModel message history as native Responses input items by @DouweM in https://github.com/pydantic/pydantic-ai/pull/11028FileUnderstanding capability by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8453MCPToolset take auth and headers as functions of the run context, so each run connects as its own user by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10846TemporalDurability via continue_as_new by @YHallouard in https://github.com/pydantic/pydantic-ai/pull/7312lockdown to GitHub to ask GitHub's server to withhold public content from users without push access by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10822SetToolMetadata(background=...) having no effect on BackgroundTools by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/10613ContentFilterError when Azure blocks a Responses API prompt without content_filter_result by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10805instructions recorded in seeded message_history by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10896BedrockConverseModel.request_stream() context exits, including on cancellation by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10900BedrockConverseModel message caching readable after a Claude message ending in a document by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10907output_type overloads for Agent.from_spec and Agent.from_file by @tjkuson in https://github.com/pydantic/pydantic-ai/pull/10886CodeMode models to import asyncio before calling asyncio.gather by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/10913openai_previous_response_id after a call to a tool with a tool_kind by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10931SystemPromptPart that no user message clears, as after a no_output retry on Anthropic by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10938InstructionBaselinePart by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10911ClearToolResults and DeduplicateFileReads by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10932VercelAIAdapter round-trip by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10933pydantic_ai.tool.retry.* attributes on argument-validation failure spans by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10934CodeMode tool calls, and a first model request that raises, until a parallel InputGuardrail decides by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10365AWSLambdaDurability by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10730Grain's write tools and treat Grain(id=None) as the default grain id by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10801AskUserAnsweredEvent with failed=True when the AskUser answerer raises by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10725played_audio_bytes and wait_for_playback() instead of a UserError once it ended the audio stream by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10940_framing.wrap, so a </system> in an instruction or tool name can't end its block by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10547ModelRetry and ToolFailed from execute hooks on BackgroundTools calls to the model by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10830AskUser questions and document its timeout, concurrency and tracing behavior by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10755RunError instead of denying silently by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7038ToolSearch(strategy='bm25') on the legacy Bedrock AsyncAnthropicBedrock client by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10340reasoning_content on DeepSeekProvider tool calls whenever the request thinks by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10350TemplateVariable and fall back to the code default on invalid templates in ManagedPrompt, and correct its docs by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10821ModalSandboxBackend and log a sandbox created after every caller was cancelled by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10816session_output_overflow as non-recoverable without a reconnect policy by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10947usage.iterations pass by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10363RealtimeTurnCompleteEvent once for a realtime turn that ends because a tool raised by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10965retry-after-ms in wait_retry_after by @DouweM in https://github.com/pydantic/pydantic-ai/pull/11065answer_webrtc_offer from rejecting the profile's audio sample rates by @DouweM in https://github.com/pydantic/pydantic-ai/pull/11049tool_search call so the model gets its result instead of searching again by @DouweM in https://github.com/pydantic/pydantic-ai/pull/11058input_transcription_model='auto' on OpenAI GPT-Live by @DouweM in https://github.com/pydantic/pydantic-ai/pull/11047Macroscope work under durable execution and return the findings of a review the CLI stopped early by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10817LogfireMCP(id=None) as the default id, accept client with auth='', and flag untrusted telemetry in its docs by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10818anthropic 2.x: build message params as dicts and keep Bedrock's anthropic_version by @DouweM in https://github.com/pydantic/pydantic-ai/pull/11077prefect>=3.9.0 so the prefect extra imports on current FastAPI by @DouweM in https://github.com/pydantic/pydantic-ai/pull/11071ModelRequest fields when WarnNearLimits strips legacy warnings by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10776ApprovalReviewer and ToolCallJudge the arguments as written, and correct the approval reviewer docs by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10727BubblewrapWorkspace by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10746FallbackModel response handlers when continuing a suspended response by @DouweM in https://github.com/pydantic/pydantic-ai/pull/11085AgentPlugin by @DouweM in https://github.com/pydantic/pydantic-ai/pull/11082thinking to reasoning.effort for OpenAI GPT-5.6 and GPT-6 on Bedrock Converse by @rscholz98 in https://github.com/pydantic/pydantic-ai/pull/10993SystemOneModel backends like vLLM by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/11092SlidingWindowCompaction and SummarizingCompaction histories sendable after tool retries and keep_messages=0, and warn on an invalid summary_prompt by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10759E2BSandbox commands on templates without ps by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10809auth='oauth' and describe only the selected products in GoogleWorkspace by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10800prefixItems and string length bounds in OpenAI strict mode by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/7333E2BSandbox raise a clear UserError on Trio before any E2B request by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10810CodeMode speculation adopting reads that predate a write, scan eager streams that split \n, and reject out-of-range resource_limits by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10764Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.59.0...v2.60.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
ModelRateLimitError from embedding models by @DouweM in #10804usage_limits, deadline, run_id and conversation_id to ModelSelectionContext by @DouweM in #10856BedrockConverseModel's maxTokens to Claude's maximum output, streaming such requests behind the scenes by @DouweM in #10845RetryPromptPart in favor of ToolReturnPart(outcome='retried') and RetryFeedbackPart by @dsfaccini in #8094<harness_data> instead of user messages in SummarizingCompaction by @DouweM in #10833AskUser, ConversationSearch, Macroscope, ManagedPrompt, PlaywrightBrowser and PydanticAIDocs a stable default id, and append ManagedPrompt version changes by @DouweM in #10904MCP capability's default id from the server URL's hostname only, and reject two servers on one host without explicit ids by @DouweM in #10807MetadataMemoryStore and Memory(write_metadata=...) by @mpfaffenberger in #10892InstructionPart passed to a run's instructions opt into on_change='append', keyed run:<name> by @DouweM in #10789SummarizingCompaction(keep_user_messages=True) copies recognized after their request is merged by @DouweM in #10914instructions from untrusted history in sanitize_messages and server-managed UI adapters by @DouweM in #10897datetime and UUID, to the model unquoted so restored histories match the first run by @dsfaccini in #10488settings and profile in model equality and Model repr by @dsfaccini in #9474OpenAIDecisionsProvider and let OpenAIDecisionsModel take OpenAIProvider by @DouweM in #10951ToolAvailabilityDeltaPart by @DouweM in #9405send(text) runs the agent's tools by @DouweM in #10960StepPersistence snapshots, and fix SqliteMediaStore, DiskMediaStore, MongoMediaStore and S3MediaStore edge cases by @mpfaffenberger in #10834Advisor capabilities by @mpfaffenberger in #10726TextContent.metadata from user prompts in sanitize_messages by @DouweM in #10943ModelConnectionError and ModelTimeoutError for xAI gRPC connection failures and client timeouts by @DouweM in #11080system_prompt and seeded history's system prompts to realtime sessions by @DouweM in #11055SubAgents background task output as framed <task_output> data instead of in a SystemPromptPart by @DouweM in #10550BrowserUse secrets on allowlisted sites and out of tool results, and fix allowlist and file:// gaps by @mpfaffenberger in #10771FileSystem denied and read-only patterns case-insensitively, protect .git files, and bound reads and Python regex searches by @mpfaffenberger in #10825GitHub tools on readOnlyHint under read_only=True, reject 'oauth', and deprecate plain http:// URLs by @mpfaffenberger in #10815'max' to unified thinking effort levels by @dsfaccini in #10920DockerSandbox harness capability that runs the workspace in a local Docker or Podman container by @mpfaffenberger in #9341SmolSandboxBackend use a VM the application already has by @adtyavrdhn in #10882in_response_to_ids by @DouweM in #10792ModelSelectionContext by @DouweM in #10836ToolDefinition.unless_tool_kind and RunContext.tool_name_for_kind, and give instructions the current step's tools by @DouweM in #10673supports_audio_file_input and supported_document_media_types profile flags by @DouweM in #10476gh-aw copilot/ models on the github-copilot: model and declare detection-engine: copilot by @mpfaffenberger in #9318base_url and MOONSHOTAI_BASE_URL support to MoonshotAIProvider by @yanlinf in #10177FileSystem by @DouweM in #9410RelevanceCompaction, which keeps, reduces or drops each older history step by a judge model's ranking by @mpfaffenberger in #11026SmartSearch harness capability for plain-English code search with a pluggable judge model by @mpfaffenberger in #8977OpenAIDecisionsModel message history as native Responses input items by @DouweM in #11028FileUnderstanding capability by @DouweM in #8453MCPToolset take auth and headers as functions of the run context, so each run connects as its own user by @DouweM in #10846TemporalDurability via continue_as_new by @YHallouard in #7312lockdown to GitHub to ask GitHub's server to withhold public content from users without push access by @mpfaffenberger in #10822SetToolMetadata(background=...) having no effect on BackgroundTools by @adtyavrdhn in #10613ContentFilterError when Azure blocks a Responses API prompt without content_filter_result by @DouweM in #10805instructions recorded in seeded message_history by @dsfaccini in #10896BedrockConverseModel.request_stream() context exits, including on cancellation by @DouweM in #10900BedrockConverseModel message caching readable after a Claude message ending in a document by @DouweM in #10907output_type overloads for Agent.from_spec and Agent.from_file by @tjkuson in #10886CodeMode models to import asyncio before calling asyncio.gather by @adtyavrdhn in #10913openai_previous_response_id after a call to a tool with a tool_kind by @DouweM in #10931SystemPromptPart that no user message clears, as after a no_output retry on Anthropic by @DouweM in #10938InstructionBaselinePart by @DouweM in #10911ClearToolResults and DeduplicateFileReads by @DouweM in #10932VercelAIAdapter round-trip by @DouweM in #10933pydantic_ai.tool.retry.* attributes on argument-validation failure spans by @DouweM in #10934CodeMode tool calls, and a first model request that raises, until a parallel InputGuardrail decides by @dsfaccini in #10365AWSLambdaDurability by @mpfaffenberger in #10730Grain's write tools and treat Grain(id=None) as the default grain id by @mpfaffenberger in #10801AskUserAnsweredEvent with failed=True when the AskUser answerer raises by @mpfaffenberger in #10725played_audio_bytes and wait_for_playback() instead of a UserError once it ended the audio stream by @DouweM in #10940_framing.wrap, so a </system> in an instruction or tool name can't end its block by @DouweM in #10547ModelRetry and ToolFailed from execute hooks on BackgroundTools calls to the model by @mpfaffenberger in #10830AskUser questions and document its timeout, concurrency and tracing behavior by @mpfaffenberger in #10755RunError instead of denying silently by @dsfaccini in #7038ToolSearch(strategy='bm25') on the legacy Bedrock AsyncAnthropicBedrock client by @dsfaccini in #10340reasoning_content on DeepSeekProvider tool calls whenever the request thinks by @dsfaccini in #10350TemplateVariable and fall back to the code default on invalid templates in ManagedPrompt, and correct its docs by @mpfaffenberger in #10821ModalSandboxBackend and log a sandbox created after every caller was cancelled by @mpfaffenberger in #10816session_output_overflow as non-recoverable without a reconnect policy by @DouweM in #10947usage.iterations pass by @dsfaccini in #10363RealtimeTurnCompleteEvent once for a realtime turn that ends because a tool raised by @DouweM in #10965retry-after-ms in wait_retry_after by @DouweM in #11065answer_webrtc_offer from rejecting the profile's audio sample rates by @DouweM in #11049tool_search call so the model gets its result instead of searching again by @DouweM in #11058input_transcription_model='auto' on OpenAI GPT-Live by @DouweM in #11047Macroscope work under durable execution and return the findings of a review the CLI stopped early by @mpfaffenberger in #10817LogfireMCP(id=None) as the default id, accept client with auth='', and flag untrusted telemetry in its docs by @mpfaffenberger in #10818anthropic 2.x: build message params as dicts and keep Bedrock's anthropic_version by @DouweM in #11077prefect>=3.9.0 so the prefect extra imports on current FastAPI by @DouweM in #11071ModelRequest fields when WarnNearLimits strips legacy warnings by @mpfaffenberger in #10776ApprovalReviewer and ToolCallJudge the arguments as written, and correct the approval reviewer docs by @mpfaffenberger in #10727BubblewrapWorkspace by @mpfaffenberger in #10746FallbackModel response handlers when continuing a suspended response by @DouweM in #11085AgentPlugin by @DouweM in #11082thinking to reasoning.effort for OpenAI GPT-5.6 and GPT-6 on Bedrock Converse by @rscholz98 in #10993SystemOneModel backends like vLLM by @mpfaffenberger in #11092SlidingWindowCompaction and SummarizingCompaction histories sendable after tool retries and keep_messages=0, and warn on an invalid summary_prompt by @mpfaffenberger in #10759E2BSandbox commands on templates without ps by @mpfaffenberger in #10809auth='oauth' and describe only the selected products in GoogleWorkspace by @mpfaffenberger in #10800prefixItems and string length bounds in OpenAI strict mode by @adtyavrdhn in #7333E2BSandbox raise a clear UserError on Trio before any E2B request by @mpfaffenberger in #10810CodeMode speculation adopting reads that predate a write, scan eager streams that split \n, and reject out-of-range resource_limits by @mpfaffenberger in #10764Note truncated.
Nothing was removed, but code that reads message history behaves differently:
RetryPromptPart][pydantic_ai.messages.RetryPromptPart]. A tool retry is that call's [ToolReturnPart][pydantic_ai.messages.ToolReturnPart] with outcome='retried', and a retry that answers no tool call is a [RetryFeedbackPart][pydantic_ai.messages.RetryFeedbackPart]. A stored 'retry-prompt' part loads as one of those too, so isinstance(part, RetryPromptPart) matches nothing, and code that counts tool errors that way reports none without an error or warning. Replace that check with [is_retry(part)][pydantic_ai.messages.is_retry], which matches both new parts, or on a release that predates it, with isinstance(part, RetryFeedbackPart) or (isinstance(part, ToolReturnPart) and part.outcome == 'retried'); Finding tool errors in history shows it in use, and how to also find tool calls that failed. The deprecation entry lists the other changes.> This comment was posted by Codex Desktop using gpt-6.1-sol on behalf of David.
This comment was posted by Codex Desktop using gpt-6.1-sol on behalf of David.
web_fetch: GHSA-4whf-38hw-pxxh. When web_fetch_tool fetched attacker-controlled HTML containing many elements, conversion could delay unrelated work in the same process. Fixed in v2.59.0 and v1.107.9. Upgrade if the tool can fetch such pages.playai-tts, playai-tts-arabic, meta-llama/llama-guard-4-12b and meta-llama/llama-4-maverick-17b-128e-instruct by @mekanbaymyradov in https://github.com/pydantic/pydantic-ai/pull/10306UsageLimitUnavailableWarning by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9491on_change='append' to preserve dynamic instruction prefixes by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/8188OutputItemCut lifecycle event by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10739LogfireMCP history instead of rewriting its instructions, keeping the prompt cache by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10543AnswersRevised by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10668ModelRateLimitError, ModelUnavailableError, ModelServerError and ModelContextWindowExceededError, and ModelHTTPError.for_category by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9354BackgroundTools results as <tool_result> tool output instead of untagged user text by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10548TrajectoryJudge steering as a framework SystemPromptPart note plus the judge message as escaped <judge_feedback> data, both marked with metadata by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10545tool_calls_limit before each CodeMode nested tool call by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10362GitHubCopilotProvider send a configurable copilot-integration-id via integration_id or GITHUB_COPILOT_INTEGRATION_ID by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10784DaytonaSandbox: a workspace that runs Coder, Shell, FileSystem and every other harness capability in a Daytona sandbox by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/10610ElevenLabsRealtimeModel for Eleven Realtime speech-to-speech models by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10738FunctionToolset.instructions and instruction functions opt into on_change='append' by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10788FileSystem tools registered tool kinds and typed call parts by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10674non_retryable_model_errors to TemporalDurability to stop Temporal retrying specific model error categories by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10803commit_audio() by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10652metadata values from OpenAI-compatible chat completions by @dergachoff in https://github.com/pydantic/pydantic-ai/pull/8010interrupt() races a failed send, the reply's end, or a later cancel by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10723agent_response_correction only to the message it names by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10709elevenlabs_agents_llm and elevenlabs_agents_tts model_id overrides on ElevenLabs Agents in Realtime voice mode by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10728contains constraints into descriptions by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10720$defs semantics during schema transformation by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10714DynamicWorkflow revealed type names, nested tool exposure, and empty WorkflowAgent descriptions by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10747BackgroundTools optional-tool args instead of raising RecursionError by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10721BackgroundTools tools that code mode's run_code calls, instead of a started message by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10750BackgroundTools instances with distinct ids select it by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10757auth='' as unset alongside client in DayAI and warn about tokens in Temporal history by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10718on_change='append' window that opened without blocks when a hook unsets instruction_parts by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10766split_bedrock_model_id, so they get the same model capabilities as the bare ID by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10664<assistant_thinking> tag so UI round trips keep the prompt cache by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10642CodeMode discovery announcements with SystemPromptPart.metadata, and announce a tool again when its announcement was dropped by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10666SummarizingCompaction summarizer transcript so tool output can't forge messages by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10544'asap' enqueue content into the same ModelRequest as the tool's ToolReturnPart by @divyankmalik in https://github.com/pydantic/pydantic-ai/pull/7043const constraints, such as Literal discriminators, in Anthropic strict schemas by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10675<context_diff> instead of <context-diff> for instruction deltas by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10790ToolCallsAbandoned realtime lifecycle event, so an abandoned tool call no longer holds its exchange open by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10793grok-4.7 to xAI known models and Grok reasoning profile by @pydanty[bot] in https://github.com/pydantic/pydantic-ai/pull/9750DeduplicateFileReads and ClearToolResults clear typed read_file results again by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10839TrajectoryJudge's steering note to its own frame with a ref, so forged <judge_feedback> tags get no authority by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10869Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.58.0...v2.59.0
This comment was posted by Codex Desktop using gpt-6.1-sol on behalf of David.
web_fetch: GHSA-4whf-38hw-pxxh. When web_fetch_tool fetched attacker-controlled HTML containing many elements, conversion could delay unrelated work in the same process. Fixed in v2.59.0 and v1.107.9. Upgrade if the tool can fetch such pages.playai-tts, playai-tts-arabic, meta-llama/llama-guard-4-12b and meta-llama/llama-4-maverick-17b-128e-instruct by @mekanbaymyradov in #10306UsageLimitUnavailableWarning by @mpfaffenberger in #9491on_change='append' to preserve dynamic instruction prefixes by @dsfaccini in #8188OutputItemCut lifecycle event by @DouweM in #10739LogfireMCP history instead of rewriting its instructions, keeping the prompt cache by @DouweM in #10543AnswersRevised by @DouweM in #10668ModelRateLimitError, ModelUnavailableError, ModelServerError and ModelContextWindowExceededError, and ModelHTTPError.for_category by @DouweM in #9354BackgroundTools results as <tool_result> tool output instead of untagged user text by @DouweM in #10548TrajectoryJudge steering as a framework SystemPromptPart note plus the judge message as escaped <judge_feedback> data, both marked with metadata by @DouweM in #10545tool_calls_limit before each CodeMode nested tool call by @dsfaccini in #10362GitHubCopilotProvider send a configurable copilot-integration-id via integration_id or GITHUB_COPILOT_INTEGRATION_ID by @dsfaccini in #10784DaytonaSandbox: a workspace that runs Coder, Shell, FileSystem and every other harness capability in a Daytona sandbox by @adtyavrdhn in #10610ElevenLabsRealtimeModel for Eleven Realtime speech-to-speech models by @DouweM in #10738FunctionToolset.instructions and instruction functions opt into on_change='append' by @DouweM in #10788FileSystem tools registered tool kinds and typed call parts by @DouweM in #10674non_retryable_model_errors to TemporalDurability to stop Temporal retrying specific model error categories by @DouweM in #10803commit_audio() by @DouweM in #10652metadata values from OpenAI-compatible chat completions by @dergachoff in #8010interrupt() races a failed send, the reply's end, or a later cancel by @DouweM in #10723agent_response_correction only to the message it names by @DouweM in #10709elevenlabs_agents_llm and elevenlabs_agents_tts model_id overrides on ElevenLabs Agents in Realtime voice mode by @DouweM in #10728contains constraints into descriptions by @dsfaccini in #10720$defs semantics during schema transformation by @dsfaccini in #10714DynamicWorkflow revealed type names, nested tool exposure, and empty WorkflowAgent descriptions by @mpfaffenberger in #10747BackgroundTools optional-tool args instead of raising RecursionError by @mpfaffenberger in #10721BackgroundTools tools that code mode's run_code calls, instead of a started message by @mpfaffenberger in #10750BackgroundTools instances with distinct ids select it by @mpfaffenberger in #10757auth='' as unset alongside client in DayAI and warn about tokens in Temporal history by @mpfaffenberger in #10718on_change='append' window that opened without blocks when a hook unsets instruction_parts by @DouweM in #10766split_bedrock_model_id, so they get the same model capabilities as the bare ID by @DouweM in #10664<assistant_thinking> tag so UI round trips keep the prompt cache by @DouweM in #10642CodeMode discovery announcements with SystemPromptPart.metadata, and announce a tool again when its announcement was dropped by @DouweM in #10666SummarizingCompaction summarizer transcript so tool output can't forge messages by @DouweM in #10544'asap' enqueue content into the same ModelRequest as the tool's ToolReturnPart by @divyankmalik in #7043const constraints, such as Literal discriminators, in Anthropic strict schemas by @DouweM in #10675<context_diff> instead of <context-diff> for instruction deltas by @DouweM in #10790ToolCallsAbandoned realtime lifecycle event, so an abandoned tool call no longer holds its exchange open by @DouweM in #10793grok-4.7 to xAI known models and Grok reasoning profile by @pydanty[bot] in #9750DeduplicateFileReads and ClearToolResults clear typed read_file results again by @DouweM in #10839TrajectoryJudge's steering note to its own frame with a ref, so forged <judge_feedback> tags get no authority by @DouweM in #10869Full Changelog: v2.58.0...v2.59.0
This comment was posted by codex-tui using gpt-6.1-sol on behalf of David.
This comment was posted by codex-tui using gpt-6.1-sol on behalf of David.
include_content=False. URL-based MCP capabilities could also expose a credential embedded in the URL-derived identifier. Fixed in v2.58.0 and v1.107.8. Restrict access to historical traces and rotate exposed credentials.MCP activity names remain unchanged to preserve in-flight workflows. With Temporal tracing enabled, also pass an explicit id= to MCP once in-flight workflows complete; changing it renames the activities.message_history and manage_system_prompt='server' (the default), Vercel AI and AG-UI adapters could execute an available tool with client-chosen arguments without a model request. Approval-required tools are not executed by this path. Fixed in v2.58.0; v1 is unaffected.'suspended' response's usage only in the run that produced it, in RunUsage, UsageLimits and SpendLimits by @DouweM in #10078RealtimeConnection yield lifecycle events through a public pydantic_ai.realtime.lifecycle module by @DouweM in #10353read_file return images and PDFs, and describe other binary files by @DouweM in #9596allowed_domains, blocked_domains, max_uses or external_web_access setting by @DouweM in #10451SystemPromptPart(scope='request') sent natively as Anthropic clear_at system messages by @DouweM in #9711WarnNearLimits warnings as request-scoped system prompts by @DouweM in #10561RepoContext <context-file> blocks and send the nested-directory pointer as a SystemPromptPart by @DouweM in #10558supports_auto_cache decide anthropic_cache, and use automatic caching on legacy AsyncAnthropicBedrock for Claude Opus 4.7 and later by @DouweM in #10551ToolKind with typed tool parts, and keep unknown kinds loadable by @DouweM in #9710Planning status-tool events after their store reads, so DBOS recovery with an event_stream_handler replays in order by @dsfaccini in #10343Planning with an event_stream_handler may not recover after upgrading; let in-flight workflows finish first or deploy a new DBOS application version.RealtimeTurnCompleteEvent with the exchange boundary that wait_for_reply() waits for by @DouweM in #10517PartEndEvents. Caption UIs should keep user parts open until their PartEndEvent, which can arrive after the reply completes.DelegationTasks.steer by @mpfaffenberger in #10359SqliteStepStore instead of repeating the history in every snapshot by @aweis89 in #9982ModelSettings['max_retries'] to set how many times the provider SDK retries a request by @DouweM in #10068timeout= and RunContext.deadline by @DouweM in #10070ctx.enqueue messages to Vercel AI and AG-UI frontends as history they send back but don't render by @DouweM in #10405ModelSettings['request_timeout'] covering all attempts and stream consumption of one model request by @DouweM in #10072PostgresStepStore and MongoStepStore instead of repeating the history in every snapshot by @DouweM in #10452Skills ignore include and exclude names no library has with unknown_names='skip' by @mpfaffenberger in #10506openai-chatgpt provider so app users can sign in with ChatGPT and use their plan by @mpfaffenberger in #10539timeout= on UI adapter run_stream(), run_stream_native() and dispatch_request() by @DouweM in #10553reasoning_summary to OpenAILiveResponsesDelegation to request the GPT-Live backend's reasoning summaries by @DouweM in #10514UnsupportedSettingWarning when a model ignores a setting like timeout, max_retries or stop_sequences by @DouweM in #10508openai_prune_tool_items to delete answered tool rounds from the OpenAI Realtime conversation by @DouweM in #10556ElevenLabsAgentsRealtimeModel to run realtime sessions on ElevenLabs Agents by @rscholz98 in #7964wait_for_reply() waiting forever when a realtime tool batch receives no reply after a call is cancelled by @DouweM in #10503RepoContext instruction file with its target's name, so CLAUDE.md -> AGENTS.md reads AGENTS.md by @mpfaffenberger in #10438ReinjectSystemPrompt(replace_existing=True) replaces the client's by @DouweM in #10389ModelResponse when VercelAIAdapter loads messages by @DouweM in #10404tool_choice='none' on BedrockConverseModel failing after a tool call by @DouweM in #10395thinking per step keeps tools stable by @DouweM in #10398ClearToolResults(max_messages=...) instead of on every request past the threshold by @DouweM in #10390MistralModel instead of filtering tools by @DouweM in #10394CachePoint after a replayed Anthropic MCP tool result by @DouweM in #10369FallbackModel by @DouweM in #10386run_stream() instead of returning a response that a model request hook rejected with ModelRetry by @DouweM in #10400Model instances a selector returns open inside async with agent: by @DouweM in #10377ThinkingParts in a user turn for models that imitate assistant formatting by @dsfaccini in #6692ToolCallPart.args_as_json_str() so UI round trips keep the prompt cache by @DouweM in #10410Model.prepare_messages so UI round trips keep the prompt cache by @DouweM in #10411AsyncInferenceClient that HuggingFaceProvider builds when the provider or agent exits by @DouweM in #10393ToolReturn(tools=...) reveals when a Vercel AI frontend rebuilds history from the event stream by @DouweM in #10401pydantic-ai engine when an earlier step wrote a noop to GH_AW_SAFE_OUTPUTS by @dsfaccini in #10450request_timeout by @DouweM in #10483RealtimeSession.context_window_used together with the usage it reports by @DouweM in #10467response.done closes it by @DouweM in #10511OpenAIResponsesModel._process_provider_details on streamed responses too by @DouweM in #10515anyio cancel ends a debounced stream_text(), stream_output() or stream_response() by @dsfaccini in #10448ModelProfile.tool_call_id_length and rewrite tool call IDs that Mistral models reject by @DouweM in #10519anthropic_cache) on AsyncAnthropicVertex by @DouweM in #10513propertyNames and contains when inlining JSON Schema definitions by @jukebox in #10588openai-codex or openai-chatgpt token refresh instead of reverting to the stored credentials it spent by @mpfaffenberger in #10615UserPromptParts through a VercelAIAdapter round trip by @DouweM in #10532CodeMode discovery announcements and stop recognizing announcements by their text by @DouweM in #10559RunUsage.__sub__, so durable runs keep one-hour cache writes and reasoning tokens, and declare cache_write_1h_tokens and output_reasoning_tokens by @DouweM in #10516send() of its last result failed by @DouweM in #10512UserPromptParts through an AGUIAdapter round trip by @DouweM in #10563openai_previous_response_id once the history before it has changed by @DouweM in #10509DeferredToolRequests to a parent that cannot resolve them by @DouweM in #10497openai_previous_response_id once the response itself has changed by @DouweM in #10656RealtimeError instead of a raw websockets exception when a GPT-Live connection drops without a reconnect policy by @DouweM in #10645ReasoningMessage.encrypted_value JSON in AGUIAdapter.load_messages by @DouweM in #10650format_as_xml mapping keys that aren't valid XML names to a key attribute by @DouweM in #10651UseEnumMemberDocstrings enums, Choices and BoolCriteria failing in Anthropic strict schemas by @DouweM in #10659$refs when merging JSON schema definitions by @limadog9 in #10601Full Changelog: v2.57.0...v2.58.0
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
origin and tool_call_id metadata to BackgroundTools completions by @michaeldunn9 in https://github.com/pydantic/pydantic-ai/pull/10196disable-model-invocation and user-invocable in Skills, and skip stray skill library paths by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10378MetaProvider for Meta Muse models, with meta: using the Responses API by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10156ApprovalReviewer to let a model approve low-risk tool calls before a person sees them by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10143dataset_name to EvaluationReport by @jirikuncar in https://github.com/pydantic/pydantic-ai/pull/10307MCPToolset.read_resource_contents by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/10179MCPToolset.call_tool_for_app by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/10190ToolReturnContent discriminator mapping by @Kludex in https://github.com/pydantic/pydantic-ai/pull/10239OpenAIResponsesModel sending unavailable tool_choice names in allowed_tools by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10232extra_content) back from OpenAIChatModel by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10235prepare its own retry count under .prefixed(), .renamed() and PrefixTools by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10219GoogleModel by @miguel-flowstate in https://github.com/pydantic/pydantic-ai/pull/8028tool_search to gpt-5.4-nano by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10272UIMessage JSON so the AI SDK accepts it by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/10175Planning tool loops in the prompt cache, and attach a leading CachePoint to the previous user message on OpenRouterModel by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10257OpenAIChatModel's default 'auto' mode by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10251available_tool_names and active_capability_ids on run context copies inside Temporal activities and Render child tasks by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10280max_duration when a reconnect policy is set by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10056ProcessEventStream cleanup after early exit and cancellation by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10341FallbackModel response handlers are skipped on a streamed request by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10066async with agent: by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10067DBOS.sleep steps under DBOSDurability and DBOSAgent by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10383SpendLimits by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10069WarnNearLimits from deleting user prompts that quote its [WarnNearLimits] marker by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10391Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.56.0...v2.57.0
origin and tool_call_id metadata to BackgroundTools completions by @michaeldunn9 in #10196disable-model-invocation and user-invocable in Skills, and skip stray skill library paths by @DouweM in #10378MetaProvider for Meta Muse models, with meta: using the Responses API by @mpfaffenberger in #10156ApprovalReviewer to let a model approve low-risk tool calls before a person sees them by @mpfaffenberger in #10143dataset_name to EvaluationReport by @jirikuncar in #10307MCPToolset.read_resource_contents by @adtyavrdhn in #10179MCPToolset.call_tool_for_app by @adtyavrdhn in #10190ToolReturnContent discriminator mapping by @Kludex in #10239OpenAIResponsesModel sending unavailable tool_choice names in allowed_tools by @dsfaccini in #10232extra_content) back from OpenAIChatModel by @dsfaccini in #10235prepare its own retry count under .prefixed(), .renamed() and PrefixTools by @dsfaccini in #10219GoogleModel by @miguel-flowstate in #8028tool_search to gpt-5.4-nano by @dsfaccini in #10272UIMessage JSON so the AI SDK accepts it by @adtyavrdhn in #10175Planning tool loops in the prompt cache, and attach a leading CachePoint to the previous user message on OpenRouterModel by @mpfaffenberger in #10257OpenAIChatModel's default 'auto' mode by @dsfaccini in #10251available_tool_names and active_capability_ids on run context copies inside Temporal activities and Render child tasks by @dsfaccini in #10280max_duration when a reconnect policy is set by @DouweM in #10056ProcessEventStream cleanup after early exit and cancellation by @dsfaccini in #10341FallbackModel response handlers are skipped on a streamed request by @DouweM in #10066async with agent: by @DouweM in #10067DBOS.sleep steps under DBOSDurability and DBOSAgent by @DouweM in #10383SpendLimits by @DouweM in #10069WarnNearLimits from deleting user prompts that quote its [WarnNearLimits] marker by @DouweM in #10391Full Changelog: v2.56.0...v2.57.0
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
BrowserUse on the host model by default and make browser-use telemetry opt-in by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9506Skills layer project and personal libraries, name each skill's directory, and render a skill for a host command by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9802base_url argument to ZaiProvider by @aisk in https://github.com/pydantic/pydantic-ai/pull/10099PGTaskDurability based on pgtask by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/10174WarnNearLimits from the harness Coder capability by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/9969SmolSandbox: a workspace that runs harness capabilities in a local smolvm microVM by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10148gemini-4-argon) on GoogleModel with long decode past the per-request output cap, and raise the Google providers' default timeout to 20 minutes by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10202send_audio() chunk whose send fails out of the realtime SpeechPart.audio recorded while it was sending by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10058auth to requests through MCPToolset(http_client=...) and stop closing the user-supplied client by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10051tool_choice to name output tools, and accept static lists that include one by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8565ModelAPIError when a 200 response from OpenAI Responses, Anthropic, Groq or OpenAI images has a text/plain body by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10065openai-codex backend by @aisk in https://github.com/pydantic/pydantic-ai/pull/10103openai-decisions pricing before matching the shared OpenAI base URL by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10122mistral-large-4 and mistral-large-4-0 by @pydanty in https://github.com/pydantic/pydantic-ai/pull/9967UsageLimits field to an explicit ACP stop reason by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9497gh-aw sessions by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10000drop_block when Bedrock rejects them by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9486import pydantic_ai.models on Pyodide by skipping the eager httpcore2 import on Emscripten by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/10134SummarizingCompaction runs by @aweis89 in https://github.com/pydantic/pydantic-ai/pull/9716CodeMode calls concurrently under parallel_ordered_events by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10137Memory snapshot with the latest user prompt instead of after tool results by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10192AnthropicModel picking native structured output that Bedrock rejects on AsyncAnthropicBedrock by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10207WorkspaceUnavailableError when a Sprite is deleted during a command, whatever its exit code by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10193genai-prices to 0.1.10 and keep tests passing on rich 15, dbos 3 and e2b 2.55 by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10077Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.55.0...v2.56.0
BrowserUse on the host model by default and make browser-use telemetry opt-in by @mpfaffenberger in #9506Skills layer project and personal libraries, name each skill's directory, and render a skill for a host command by @DouweM in #9802base_url argument to ZaiProvider by @aisk in #10099PGTaskDurability based on pgtask by @adtyavrdhn in #10174WarnNearLimits from the harness Coder capability by @adtyavrdhn in #9969SmolSandbox: a workspace that runs harness capabilities in a local smolvm microVM by @mpfaffenberger in #10148gemini-4-argon) on GoogleModel with long decode past the per-request output cap, and raise the Google providers' default timeout to 20 minutes by @dsfaccini in #10202send_audio() chunk whose send fails out of the realtime SpeechPart.audio recorded while it was sending by @DouweM in #10058auth to requests through MCPToolset(http_client=...) and stop closing the user-supplied client by @DouweM in #10051tool_choice to name output tools, and accept static lists that include one by @adtyavrdhn in #8565ModelAPIError when a 200 response from OpenAI Responses, Anthropic, Groq or OpenAI images has a text/plain body by @DouweM in #10065openai-codex backend by @aisk in #10103openai-decisions pricing before matching the shared OpenAI base URL by @dsfaccini in #10122mistral-large-4 and mistral-large-4-0 by @pydanty in #9967UsageLimits field to an explicit ACP stop reason by @mpfaffenberger in #9497gh-aw sessions by @dsfaccini in #10000drop_block when Bedrock rejects them by @mpfaffenberger in #9486import pydantic_ai.models on Pyodide by skipping the eager httpcore2 import on Emscripten by @adtyavrdhn in #10134SummarizingCompaction runs by @aweis89 in #9716CodeMode calls concurrently under parallel_ordered_events by @mpfaffenberger in #10137Memory snapshot with the latest user prompt instead of after tool results by @mpfaffenberger in #10192AnthropicModel picking native structured output that Bedrock rejects on AsyncAnthropicBedrock by @dsfaccini in #10207WorkspaceUnavailableError when a Sprite is deleted during a command, whatever its exit code by @mpfaffenberger in #10193genai-prices to 0.1.10 and keep tests passing on rich 15, dbos 3 and e2b 2.55 by @dsfaccini in #10077Full Changelog: v2.55.0...v2.56.0
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
ExaSearch, YouSearch, LocalStack and other harness capabilities under durable execution by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9705retain_audio_max_seconds by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9702LogfireMCP tool names with logfire_ by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9868FileUrl.media_type as null for extensionless URLs instead of raising by @pydanty in https://github.com/pydantic/pydantic-ai/pull/8405run_id and conversation_id stable when a durable run is re-executed by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9701FallbackModel attempt with its model, timing, error and usage, and count rejected responses in RunUsage by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8745OpenAIDecisionsModel backend with image input by @DenysMoskalenko in https://github.com/pydantic/pydantic-ai/pull/9634import pydantic_ai time by loading pydantic_ai.mcp only when an MCP capability needs it by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10046Conversation to carry and store a conversation between runs, accepted as conversation= by every entry point by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8337provider_details: on by default for OpenAI Responses, anthropic_cache_diagnostics opt-in by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9406pydantic_ai.cache.* span attributes and collapse events by @DouweM in https://github.com/pydantic/pydantic-ai/pull/65342026-07-15 and apply parallel_tool_calls=False there by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9409warning events as Python warnings instead of dropping them by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9420openai_cache_instructions to place a prompt cache breakpoint on the instructions by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/7559hang_up() to end a WebRTC call from the server on gpt-realtime and GPT-Live by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9342PostgresStepStore and PostgresMediaStore, the hosted Postgres backends for messages and media by @rscholz98 in https://github.com/pydantic/pydantic-ai/pull/9899cache setting and Caching capability for cross-provider prompt caching by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/7560claude-haiku-5-5 by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/9998message_history into a WebRTC call through answer_webrtc_offer by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9338cache=True uses Anthropic's automatic caching by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10047Coder by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10040openai_live_idle_audio so text-only GPT-Live sessions work without a microphone by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9295auth.json as UTF-8 regardless of platform locale by @pydanty in https://github.com/pydantic/pydantic-ai/pull/8254WarnOnCacheBusts warnings after native tool calls by @aweis89 in https://github.com/pydantic/pydantic-ai/pull/9746durable_operation inline when it is called from inside a durable unit by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9700max_duration error instead of reconnecting into the same limit by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9415CachePoint to the previous message on OpenAI instead of raising by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9582run_stream_sync() mid-output by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9709BedrockEmbeddingModel errors as ModelHTTPError/ModelAPIError instead of an ExceptionGroup, and map botocore transport errors by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9314session.close by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9403idle_timeout_ms follow-up as an empty user turn by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9396delegate_task(resume=...) by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9783AgentRunResult's public shape in its validation JSON schema by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9791Planning's plan store calls under durable execution, so recovery doesn't repeat its writes by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9789Memory tool call under durable execution, so a forked DBOS workflow doesn't repeat its writes by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9832openai_prompt_cache_retention widen the cache-health window on GPT-5.6+ by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9851_meta.ui.visibility leaves out "model" from the model in MCPToolset by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/9862moderation stub from SnowflakeModel responses by @specterbuilds in https://github.com/pydantic/pydantic-ai/pull/9764$refs and draft-07 definitions in MCP TypeScript SDK tool schemas by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/9643span_tree and metrics for run_on_errors evaluators when a task raises by @Diwak4r in https://github.com/pydantic/pydantic-ai/pull/7070SystemOneModel question would have no instructions by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9848MCPReadOnlyNoToolsWarning to _warn so harness submodule imports stay light by @pydanty in https://github.com/pydantic/pydantic-ai/pull/9922SpendLimits continuation chains per segment boundary so a durable retry charges newly billed segments by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10002cache={'messages': False} can't place an instruction breakpoint by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10007InputGuardrail blocks by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10003is_text_like_media_type by @pydanty in https://github.com/pydantic/pydantic-ai/pull/9948BinaryContent.from_data_uri by @pydanty in https://github.com/pydantic/pydantic-ai/pull/9950gpt-6.1-sol support on Bedrock Converse by @pydanty in https://github.com/pydantic/pydantic-ai/pull/9817tool_call_id repeated within one response by @pydanty in https://github.com/pydantic/pydantic-ai/pull/9819SummarizingCompaction tail budget by @pydanty in https://github.com/pydantic/pydantic-ai/pull/9715Researcher construction under TemporalDurability and PrefectDurability by @pydanty in https://github.com/pydantic/pydantic-ai/pull/9564FallbackModel ignoring handler functions in fallback_on tuples by @pydanty in https://github.com/pydantic/pydantic-ai/pull/10031SummarizingCompaction summaries instead of replacing history with an empty summary by @aweis89 in https://github.com/pydantic/pydantic-ai/pull/9748Retry-After HTTP dates by @ktz03 in https://github.com/pydantic/pydantic-ai/pull/10023function_call_arguments.done or output_item.done by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10039Agent.to_web() for invalid chat requests by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10042EvaluationReport.render() and print() from parsing case, task and evaluator text as Rich markup by @lets-order-some-fries in https://github.com/pydantic/pydantic-ai/pull/9544$refs under propertyNames and patternProperties when merging schema defs by @jayzuccarelli in https://github.com/pydantic/pydantic-ai/pull/8805SlidingWindowCompaction receipt would take the only kept slot by @aweis89 in https://github.com/pydantic/pydantic-ai/pull/9719parallel_ordered_events when a sibling raises or the run is cancelled by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10049StreamedRunResult.result by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10048null args fragment in AG-UI and Vercel AI adapters by @pydanty in https://github.com/pydantic/pydantic-ai/pull/9724done snapshot disagrees, instead of starting the part again by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10044See file reference, not its repr, in harness compaction by @pepijn-m in https://github.com/pydantic/pydantic-ai/pull/9632CodeMode run_code description by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9315merge_json_schema_defs corrupting branch schemas on transitive def-name collisions by @pydanty in https://github.com/pydantic/pydantic-ai/pull/9735SpendLimits budgets for responses a FallbackModel rejected by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9792TextOutput JSON schema to infer the wrapped function's return annotation by @pydanty in https://github.com/pydantic/pydantic-ai/pull/9652FallbackModel attempts once in SpendLimits when a failed continuation chain is retried by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10059ModelAPIError for transport errors that escaped Google, Mistral, Cohere, Hugging Face, Anthropic, Groq and Bedrock by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9336openai floor to 3.26.0 for Decisions support in the openai, openrouter, bedrock-mantle, zai, snowflake, crusoe and cerebras extras by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/9968Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.54.0...v2.55.0
ExaSearch, YouSearch, LocalStack and other harness capabilities under durable execution by @DouweM in #9705retain_audio_max_seconds by @DouweM in #9702LogfireMCP tool names with logfire_ by @mpfaffenberger in #9868FileUrl.media_type as null for extensionless URLs instead of raising by @pydanty in #8405run_id and conversation_id stable when a durable run is re-executed by @DouweM in #9701FallbackModel attempt with its model, timing, error and usage, and count rejected responses in RunUsage by @DouweM in #8745OpenAIDecisionsModel backend with image input by @DenysMoskalenko in #9634import pydantic_ai time by loading pydantic_ai.mcp only when an MCP capability needs it by @DouweM in #10046Conversation to carry and store a conversation between runs, accepted as conversation= by every entry point by @DouweM in #8337provider_details: on by default for OpenAI Responses, anthropic_cache_diagnostics opt-in by @DouweM in #9406pydantic_ai.cache.* span attributes and collapse events by @DouweM in #65342026-07-15 and apply parallel_tool_calls=False there by @DouweM in #9409warning events as Python warnings instead of dropping them by @DouweM in #9420openai_cache_instructions to place a prompt cache breakpoint on the instructions by @adtyavrdhn in #7559hang_up() to end a WebRTC call from the server on gpt-realtime and GPT-Live by @DouweM in #9342PostgresStepStore and PostgresMediaStore, the hosted Postgres backends for messages and media by @rscholz98 in #9899cache setting and Caching capability for cross-provider prompt caching by @adtyavrdhn in #7560claude-haiku-5-5 by @dsfaccini in #9998message_history into a WebRTC call through answer_webrtc_offer by @DouweM in #9338cache=True uses Anthropic's automatic caching by @DouweM in #10047Coder by @DouweM in #10040openai_live_idle_audio so text-only GPT-Live sessions work without a microphone by @DouweM in #9295auth.json as UTF-8 regardless of platform locale by @pydanty in #8254WarnOnCacheBusts warnings after native tool calls by @aweis89 in #9746durable_operation inline when it is called from inside a durable unit by @DouweM in #9700max_duration error instead of reconnecting into the same limit by @DouweM in #9415CachePoint to the previous message on OpenAI instead of raising by @DouweM in #9582run_stream_sync() mid-output by @DouweM in #9709BedrockEmbeddingModel errors as ModelHTTPError/ModelAPIError instead of an ExceptionGroup, and map botocore transport errors by @DouweM in #9314session.close by @DouweM in #9403idle_timeout_ms follow-up as an empty user turn by @DouweM in #9396delegate_task(resume=...) by @DouweM in #9783AgentRunResult's public shape in its validation JSON schema by @DouweM in #9791Planning's plan store calls under durable execution, so recovery doesn't repeat its writes by @DouweM in #9789Memory tool call under durable execution, so a forked DBOS workflow doesn't repeat its writes by @DouweM in #9832openai_prompt_cache_retention widen the cache-health window on GPT-5.6+ by @DouweM in #9851_meta.ui.visibility leaves out "model" from the model in MCPToolset by @adtyavrdhn in #9862moderation stub from SnowflakeModel responses by @specterbuilds in #9764$refs and draft-07 definitions in MCP TypeScript SDK tool schemas by @dsfaccini in #9643span_tree and metrics for run_on_errors evaluators when a task raises by @Diwak4r in #7070SystemOneModel question would have no instructions by @DouweM in #9848MCPReadOnlyNoToolsWarning to _warn so harness submodule imports stay light by @pydanty in #9922SpendLimits continuation chains per segment boundary so a durable retry charges newly billed segments by @mpfaffenberger in #10002cache={'messages': False} can't place an instruction breakpoint by @DouweM in #10007InputGuardrail blocks by @mpfaffenberger in #10003is_text_like_media_type by @pydanty in #9948BinaryContent.from_data_uri by @pydanty in #9950gpt-6.1-sol support on Bedrock Converse by @pydanty in #9817tool_call_id repeated within one response by @pydanty in #9819SummarizingCompaction tail budget by @pydanty in #9715Researcher construction under TemporalDurability and PrefectDurability by @pydanty in #9564FallbackModel ignoring handler functions in fallback_on tuples by @pydanty in #10031SummarizingCompaction summaries instead of replacing history with an empty summary by @aweis89 in #9748Retry-After HTTP dates by @ktz03 in #10023function_call_arguments.done or output_item.done by @DouweM in #10039Agent.to_web() for invalid chat requests by @DouweM in #10042EvaluationReport.render() and print() from parsing case, task and evaluator text as Rich markup by @lets-order-some-fries in #9544$refs under propertyNames and patternProperties when merging schema defs by @jayzuccarelli in #8805SlidingWindowCompaction receipt would take the only kept slot by @aweis89 in #9719parallel_ordered_events when a sibling raises or the run is cancelled by @DouweM in #10049StreamedRunResult.result by @DouweM in #10048null args fragment in AG-UI and Vercel AI adapters by @pydanty in #9724done snapshot disagrees, instead of starting the part again by @DouweM in #10044See file reference, not its repr, in harness compaction by @pepijn-m in #9632CodeMode run_code description by @mpfaffenberger in #9315merge_json_schema_defs corrupting branch schemas on transitive def-name collisions by @pydanty in #9735SpendLimits budgets for responses a FallbackModel rejected by @DouweM in #9792TextOutput JSON schema to infer the wrapped function's return annotation by @pydanty in #9652FallbackModel attempts once in SpendLimits when a failed continuation chain is retried by @DouweM in #10059ModelAPIError for transport errors that escaped Google, Mistral, Cohere, Hugging Face, Anthropic, Groq and Bedrock by @DouweM in #9336openai floor to 3.26.0 for Decisions support in the openai, openrouter, bedrock-mantle, zai, snowflake, crusoe and cerebras extras by @dsfaccini in #9968Full Changelog: v2.54.0...v2.55.0
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
items in JsonSchemaTransformer, TestModel and Mistral streamed output, and make TestModel accept boolean subschemas and cap prefixItems at maxItems by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/9560ImageGeneration under FallbackModel and dataclasses.replace, and compare Embedder by identity by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/9477wrap_* hooks enclose complete stage lifecycles by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/7053BackgroundTools tool raises an unexpected exception, as a sequential tool does by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9434SubAgents agent_folders default-change warning: since v2.52.0 (#9023) the agents folder is not loaded by default, so pass agent_folders='agents' to keep loading it by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9424RepoContext inventory by default by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9382CodeMode missing-return-schema warning its own CodeModeReturnSchemaWarning category by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9423cancel_and_resume example: cancel and resume a streaming run by @DouweM in https://github.com/pydantic/pydantic-ai/pull/7012OpenAILiveModel sessions by forking a stored session or replaying the history by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9401create_async_httpx2_client() public by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9600gpt-live-transcribe for OpenAI realtime's default input_transcription_model='auto' and list gpt-transcribe by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9402WebSearchTool on OpenAI GPT-Live through its delegated backend by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9049native to ExaSearch and YouSearch to prefer the model's native web search, and web_search_tool() for WebSearch(local=...) by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9386realpath fallback when readlink cannot read a symlink by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/9613sniffio package in pydantic-evals and pydantic-ai-harness by @pydanty in https://github.com/pydantic/pydantic-ai/pull/9620ImageGenerationTool to the local tool on Gemini text models, and keep tool output when a native tool falls back locally on Gemini 2.5 by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/9551null finish_reason on a SnowflakeModel response like an empty one by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9590LocalFileStore root another user owns, and log ToolOutputLimits spill and summarize fallbacks by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9020ConversationSearch default-scope warning will be removed by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9383read_only=True removes every hosted MCP tool by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9387TrajectoryJudge window by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9425search_tools tool by its tool_kind instead of its name by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9603CodeMode by its tool_kind, so a prefixed search tool still gets its notes by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9604LLMReminder generation failures instead of silently falling back to GoalReanchor text by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9024run_stream() usage by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9694ModelResponse from streamed and complete GoogleModel responses, and add Gemini 3 web search sources by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9594RunCancelled.from_cancellation() when a DBOS workflow is cancelled by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9394setup_logfire callbacks replay-safe and add replay_safe to LogfirePlugin by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9698ModelAPIError for undecodable 200 response bodies from Anthropic, Bedrock, Groq, Hugging Face, Google, and OpenAI embeddings and images by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9350run_sync() by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9605audio_output_sample_rate by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9399load_capability is called twice for it in one response by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9397ToolAvailabilityDeltaPart announcement out of the standing system prompt by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9413OpenAIChatModel streams by @pydanty in https://github.com/pydantic/pydantic-ai/pull/8729BubblewrapWorkspace commands from running code on the SSH host through shell startup files or the SSHWorkspaceBackend stop script's PATH (VERIA-212) by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9673Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.53.0...v2.54.0
items in JsonSchemaTransformer, TestModel and Mistral streamed output, and make TestModel accept boolean subschemas and cap prefixItems at maxItems by @dsfaccini in #9560ImageGeneration under FallbackModel and dataclasses.replace, and compare Embedder by identity by @dsfaccini in #9477wrap_* hooks enclose complete stage lifecycles by @adtyavrdhn in #7053BackgroundTools tool raises an unexpected exception, as a sequential tool does by @DouweM in #9434SubAgents agent_folders default-change warning: since v2.52.0 (#9023) the agents folder is not loaded by default, so pass agent_folders='agents' to keep loading it by @DouweM in #9424RepoContext inventory by default by @DouweM in #9382CodeMode missing-return-schema warning its own CodeModeReturnSchemaWarning category by @DouweM in #9423cancel_and_resume example: cancel and resume a streaming run by @DouweM in #7012OpenAILiveModel sessions by forking a stored session or replaying the history by @DouweM in #9401create_async_httpx2_client() public by @DouweM in #9600gpt-live-transcribe for OpenAI realtime's default input_transcription_model='auto' and list gpt-transcribe by @DouweM in #9402WebSearchTool on OpenAI GPT-Live through its delegated backend by @DouweM in #9049native to ExaSearch and YouSearch to prefer the model's native web search, and web_search_tool() for WebSearch(local=...) by @DouweM in #9386realpath fallback when readlink cannot read a symlink by @dsfaccini in #9613sniffio package in pydantic-evals and pydantic-ai-harness by @pydanty in #9620ImageGenerationTool to the local tool on Gemini text models, and keep tool output when a native tool falls back locally on Gemini 2.5 by @dsfaccini in #9551null finish_reason on a SnowflakeModel response like an empty one by @DouweM in #9590LocalFileStore root another user owns, and log ToolOutputLimits spill and summarize fallbacks by @DouweM in #9020ConversationSearch default-scope warning will be removed by @DouweM in #9383read_only=True removes every hosted MCP tool by @DouweM in #9387TrajectoryJudge window by @DouweM in #9425search_tools tool by its tool_kind instead of its name by @DouweM in #9603CodeMode by its tool_kind, so a prefixed search tool still gets its notes by @DouweM in #9604LLMReminder generation failures instead of silently falling back to GoalReanchor text by @DouweM in #9024run_stream() usage by @DouweM in #9694ModelResponse from streamed and complete GoogleModel responses, and add Gemini 3 web search sources by @DouweM in #9594RunCancelled.from_cancellation() when a DBOS workflow is cancelled by @DouweM in #9394setup_logfire callbacks replay-safe and add replay_safe to LogfirePlugin by @DouweM in #9698ModelAPIError for undecodable 200 response bodies from Anthropic, Bedrock, Groq, Hugging Face, Google, and OpenAI embeddings and images by @DouweM in #9350run_sync() by @DouweM in #9605audio_output_sample_rate by @DouweM in #9399load_capability is called twice for it in one response by @DouweM in #9397ToolAvailabilityDeltaPart announcement out of the standing system prompt by @DouweM in #9413OpenAIChatModel streams by @pydanty in #8729BubblewrapWorkspace commands from running code on the SSH host through shell startup files or the SSHWorkspaceBackend stop script's PATH (VERIA-212) by @mpfaffenberger in #9673Full Changelog: v2.53.0...v2.54.0
Deprecate pydantic_ai_harness.step_persistence.naming by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9499
<!-- Release notes generated using configuration in .github/release.yml at main -->
This release fixes one security issue in ConcurrencyLimitedModel. See the advisory for full details and affected versions.
ConcurrencyLimitedModel or limit_model_concurrency could keep its concurrency slot when the slot was released on a different task than the one that acquired it: after an early exit (the consumer stopped iterating, raised, or was cancelled), and also after fully consuming stream_text() with its default debouncing. Repeated streams could then block every request sharing the limiter. Agent-level max_concurrency and non-streaming requests are not affected. Reported by @lche511. (#9478)The fix also changes how limiters are shared: a model wrapper now raises UserError when it shares a limiter with the agent making the request or with an enclosing model wrapper, ConcurrencyLimiter.acquire() takes a slot on every call, even on the same task, and a custom AbstractConcurrencyLimiter must allow release() from another task.
Patched in 2.53.0. v1 is not affected.
oneOf schema support to TestModel's generated data by @pydanty in https://github.com/pydantic/pydantic-ai/pull/8783pydantic_ai_harness.step_persistence.naming by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9499usage by @pydanty in https://github.com/pydantic/pydantic-ai/pull/8891AbsurdDurability to the harness as a replacement for pydantic-ai-absurd by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8946AskUser defer questions to the host and time out a slow answerer by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9509SystemOneModel to run decision models such as CLM and Laya over the /v1/systemone API by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/8942ToolCallJudge to assess tool calls before execution by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9041repair_messages by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8370LocalWorkspaceBackend.run timeout fires during process startup by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/9358CodeMode analysis by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9475Memory toolset across runs so durable execution accepts it by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9489Planning toolset across runs so durable execution accepts it by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9507BubblewrapSandbox on the next launch by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/9457inf/-inf/nan by @pydanty in https://github.com/pydantic/pydantic-ai/pull/8852gemini-3.1-flash-image thinking efforts to minimal and high on the Gemini API by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/9515UnexpectedModelBehavior instead of running the wrong tool when function tool calls share a tool_call_id by @pydanty in https://github.com/pydantic/pydantic-ai/pull/8782XaiModel thinking part per output, matching the non-streamed response by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9416OpenAIResponsesModel replay when openai_store=False by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9388ModelResponse from streamed and complete OpenAIChatModel and OpenRouterModel responses by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9418OpenAIResponsesModel build the same ModelResponse from a stream as from a complete response by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9417commit_audio() alone no longer triggers a reply, and create_response() is always answered by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9070status, status_details and session values the SDK does not know yet by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9392SubAgents from forcing thinking on disk agents by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9384DynamicWorkflow reveal announcements after compaction or history loss by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9371ActivityConfig schema by @pydanty in https://github.com/pydantic/pydantic-ai/pull/9577GoogleRealtimeModel declare tools whose dict values are recursive models by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/9607Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.52.0...v2.53.0
This release fixes one security issue in ConcurrencyLimitedModel. See the advisory for full details and affected versions.
ConcurrencyLimitedModel or limit_model_concurrency could keep its concurrency slot when the slot was released on a different task than the one that acquired it: after an early exit (the consumer stopped iterating, raised, or was cancelled), and also after fully consuming stream_text() with its default debouncing. Repeated streams could then block every request sharing the limiter. Agent-level max_concurrency and non-streaming requests are not affected. Reported by @lche511. (#9478)The fix also changes how limiters are shared: a model wrapper now raises UserError when it shares a limiter with the agent making the request or with an enclosing model wrapper, ConcurrencyLimiter.acquire() takes a slot on every call, even on the same task, and a custom AbstractConcurrencyLimiter must allow release() from another task.
Patched in 2.53.0. v1 is not affected.
oneOf schema support to TestModel's generated data by @pydanty in #8783pydantic_ai_harness.step_persistence.naming by @mpfaffenberger in #9499usage by @pydanty in #8891AbsurdDurability to the harness as a replacement for pydantic-ai-absurd by @adtyavrdhn in #8946AskUser defer questions to the host and time out a slow answerer by @mpfaffenberger in #9509SystemOneModel to run decision models such as CLM and Laya over the /v1/systemone API by @mpfaffenberger in #8942ToolCallJudge to assess tool calls before execution by @DouweM in #9041repair_messages by @DouweM in #8370LocalWorkspaceBackend.run timeout fires during process startup by @dsfaccini in #9358CodeMode analysis by @mpfaffenberger in #9475Memory toolset across runs so durable execution accepts it by @mpfaffenberger in #9489Planning toolset across runs so durable execution accepts it by @mpfaffenberger in #9507BubblewrapSandbox on the next launch by @dsfaccini in #9457inf/-inf/nan by @pydanty in #8852gemini-3.1-flash-image thinking efforts to minimal and high on the Gemini API by @dsfaccini in #9515UnexpectedModelBehavior instead of running the wrong tool when function tool calls share a tool_call_id by @pydanty in #8782XaiModel thinking part per output, matching the non-streamed response by @DouweM in #9416OpenAIResponsesModel replay when openai_store=False by @DouweM in #9388ModelResponse from streamed and complete OpenAIChatModel and OpenRouterModel responses by @DouweM in #9418OpenAIResponsesModel build the same ModelResponse from a stream as from a complete response by @DouweM in #9417commit_audio() alone no longer triggers a reply, and create_response() is always answered by @DouweM in #9070status, status_details and session values the SDK does not know yet by @DouweM in #9392SubAgents from forcing thinking on disk agents by @DouweM in #9384DynamicWorkflow reveal announcements after compaction or history loss by @DouweM in #9371ActivityConfig schema by @pydanty in #9577GoogleRealtimeModel declare tools whose dict values are recursive models by @dsfaccini in #9607Full Changelog: v2.52.0...v2.53.0
Stop SubAgents loading agent files by default, and deprecate inherit_tools by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9023
This release fixes one security issue in web_fetch. See the advisory for full details and affected versions.
web_fetch tool could consume excessive CPU and memory. Provider-native web fetching is not affected. Reported by @SounLabs. (#8984)Patched in 2.52.0 (v2) and 1.107.7 (v1).
pydantic-ai-harness now lives in this repository and ships with every Pydantic AI release, so it jumps from 0.36.0 to 0.52.0.
Coder, FileSystem, Shell and the rest work through ctx.workspace, locally or in a sandbox by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8866ModalSandbox's own tools with a Modal workspace, so Coder, Shell and FileSystem run in the sandbox; ModalSandboxBackend replaces ModalSandboxSession by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8867AnthropicModel's default max_tokens from 4096 to 16384 on Claude Sonnet 4.5 and later by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9025DecisionModel's judged text after a retry by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/8967SubAgents loading agent files by default, and deprecate inherit_tools by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9023AnthropicModel's max_tokens to the model's maximum output, streaming such requests behind the scenes by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9298ctx.workspace gives tools one API for files and commands, on your machine or in a sandbox, with durable execution support by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/6492SpritesSandbox: a workspace that runs Coder, Shell, FileSystem and every other harness capability in a Fly.io Sprite by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8869E2BSandbox: a workspace that runs Coder, Shell, FileSystem and every other harness capability in an E2B sandbox by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8868Coder file tools a retry budget of 5 and keep scratch files out of the project by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/8970claude-sonnet-5-5) support by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/8974async_tool_call_mode with a shared async_tool_calls setting by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8813_process_provider_details hook to OpenAIResponsesModel by @pydanty in https://github.com/pydantic/pydantic-ai/pull/9094gemini-3.1-flash-live-preview and gemini-3.8-live by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9047answer_webrtc_offer and a sideband session by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9059SSHWorkspace and BubblewrapSandbox harness capabilities by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/8956azure_voice_live_voice to choose an Azure voice for Azure AI Voice Live sessions by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9044thinking, openai_turn_detection, openai_input_noise_reduction and a new azure_voice_live_temperature on Azure AI Voice Live by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9051gemini-3.8-live by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9058RequestUsage.extract() failures by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8564default_cache_retention + prompt_cache_outlook() cold-window helper; rename resolve_prompt_cache_retention() to resolve_cache_retention() by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6337thinking and parallel_tool_calls settings to the GPT-Live backend model by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9040mxfp4, nvfp4, and mxfp8 OpenRouter quantizations and the exacto sort value by @harimaruthachalam in https://github.com/pydantic/pydantic-ai/pull/8888gpt-6.1-sol model support and allow image output on gpt-6-astra by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/9305application/toml as text-like for inline model inputs by @JoeyTan21 in https://github.com/pydantic/pydantic-ai/pull/8848wait_for_reply() hanging on merged or failed replies by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8765ModelProfile so they apply on every provider route by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8808RealtimeTurnCompleteEvent before the spoken answer by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8766output_type by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8812max_tokens by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8986response.create by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8763UserError instead of ModelRetry for Macroscope setup failures by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8999RequestUsage.details and price them in cost by @dltsum in https://github.com/pydantic/pydantic-ai/pull/8310compact_messages() by @yang0228 in https://github.com/pydantic/pydantic-ai/pull/8241azure_voice_live=True for gpt-realtime-2 models on AzureRealtimeModel by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9050handshake_timeout by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9042gemini-live-2.5-flash and remove a stale Gemini Live docs claim by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9069DeferredToolRequestsEvent in realtime sessions before the HandleDeferredToolCalls handler runs by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9057ModelAPIError by @pydanty in https://github.com/pydantic/pydantic-ai/pull/8846ModelAPIError in OpenAIChatModel, GroqModel and HuggingFaceModel by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9313ModelAPIError instead of ValidationError when an OpenRouterModel stream drops mid-response by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9312capabilities docs topic from capabilities/overview.md in PydanticAIDocs by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9011FileSystem default read_only_patterns to nested .env and .git/ paths by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9021CodeMode discovery announcements after compaction or history loss by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9045TrajectoryJudge window when the transcript is clamped by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9012ContentFilterError for a thinking-only response refused by the content filter, instead of retrying by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9355BubblewrapSandbox by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9349LogfireMCP instructions so they stop busting the prompt cache by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/9319ModelAPIError when the OpenAI Responses API reports a failed response or an error stream event by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9321MistralError from the Mistral SDK to ModelHTTPError or ModelAPIError by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9307GoogleModel.count_tokens and XaiModel file uploads by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9308ClampOversizedMessages, SubAgents, and StepPersistence by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9026data validation errors under result.data so retry feedback keeps the failing input by @pydanty in https://github.com/pydantic/pydantic-ai/pull/8669shell job log deleted mid-read as empty instead of failing the call by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/9322turn_complete_reason as the realtime response's finish_reason by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9390request_limit by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9380SubAgent usage toward parent budgets by @DouweM in https://github.com/pydantic/pydantic-ai/pull/9374Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.51.0...v2.52.0
This release fixes one security issue in web_fetch. See the advisory for full details and affected versions.
web_fetch tool could consume excessive CPU and memory. Provider-native web fetching is not affected. Reported by @SounLabs. (#8984)Patched in 2.52.0 (v2) and 1.107.7 (v1).
pydantic-ai-harness now lives in this repository and ships with every Pydantic AI release, so it jumps from 0.36.0 to 0.52.0.
Coder, FileSystem, Shell and the rest work through ctx.workspace, locally or in a sandbox by @adtyavrdhn in #8866ModalSandbox's own tools with a Modal workspace, so Coder, Shell and FileSystem run in the sandbox; ModalSandboxBackend replaces ModalSandboxSession by @adtyavrdhn in #8867AnthropicModel's default max_tokens from 4096 to 16384 on Claude Sonnet 4.5 and later by @DouweM in #9025DecisionModel's judged text after a retry by @dsfaccini in #8967SubAgents loading agent files by default, and deprecate inherit_tools by @DouweM in #9023AnthropicModel's max_tokens to the model's maximum output, streaming such requests behind the scenes by @DouweM in #9298ctx.workspace gives tools one API for files and commands, on your machine or in a sandbox, with durable execution support by @adtyavrdhn in #6492SpritesSandbox: a workspace that runs Coder, Shell, FileSystem and every other harness capability in a Fly.io Sprite by @adtyavrdhn in #8869E2BSandbox: a workspace that runs Coder, Shell, FileSystem and every other harness capability in an E2B sandbox by @adtyavrdhn in #8868Coder file tools a retry budget of 5 and keep scratch files out of the project by @mpfaffenberger in #8970claude-sonnet-5-5) support by @dsfaccini in #8974async_tool_call_mode with a shared async_tool_calls setting by @DouweM in #8813_process_provider_details hook to OpenAIResponsesModel by @pydanty in #9094gemini-3.1-flash-live-preview and gemini-3.8-live by @DouweM in #9047answer_webrtc_offer and a sideband session by @DouweM in #9059SSHWorkspace and BubblewrapSandbox harness capabilities by @mpfaffenberger in #8956azure_voice_live_voice to choose an Azure voice for Azure AI Voice Live sessions by @DouweM in #9044thinking, openai_turn_detection, openai_input_noise_reduction and a new azure_voice_live_temperature on Azure AI Voice Live by @DouweM in #9051gemini-3.8-live by @DouweM in #9058RequestUsage.extract() failures by @adtyavrdhn in #8564default_cache_retention + prompt_cache_outlook() cold-window helper; rename resolve_prompt_cache_retention() to resolve_cache_retention() by @DouweM in #6337thinking and parallel_tool_calls settings to the GPT-Live backend model by @DouweM in #9040mxfp4, nvfp4, and mxfp8 OpenRouter quantizations and the exacto sort value by @harimaruthachalam in #8888gpt-6.1-sol model support and allow image output on gpt-6-astra by @dsfaccini in #9305application/toml as text-like for inline model inputs by @JoeyTan21 in #8848wait_for_reply() hanging on merged or failed replies by @DouweM in #8765ModelProfile so they apply on every provider route by @DouweM in #8808RealtimeTurnCompleteEvent before the spoken answer by @DouweM in #8766output_type by @DouweM in #8812max_tokens by @DouweM in #8986response.create by @DouweM in #8763UserError instead of ModelRetry for Macroscope setup failures by @DouweM in #8999RequestUsage.details and price them in cost by @dltsum in #8310compact_messages() by @yang0228 in #8241azure_voice_live=True for gpt-realtime-2 models on AzureRealtimeModel by @DouweM in #9050handshake_timeout by @DouweM in #9042gemini-live-2.5-flash and remove a stale Gemini Live docs claim by @DouweM in #9069DeferredToolRequestsEvent in realtime sessions before the HandleDeferredToolCalls handler runs by @DouweM in #9057ModelAPIError by @pydanty in #8846ModelAPIError in OpenAIChatModel, GroqModel and HuggingFaceModel by @DouweM in #9313ModelAPIError instead of ValidationError when an OpenRouterModel stream drops mid-response by @DouweM in #9312capabilities docs topic from capabilities/overview.md in PydanticAIDocs by @DouweM in #9011FileSystem default read_only_patterns to nested .env and .git/ paths by @DouweM in #9021CodeMode discovery announcements after compaction or history loss by @DouweM in #9045TrajectoryJudge window when the transcript is clamped by @DouweM in #9012ContentFilterError for a thinking-only response refused by the content filter, instead of retrying by @DouweM in #9355BubblewrapSandbox by @mpfaffenberger in #9349LogfireMCP instructions so they stop busting the prompt cache by @mpfaffenberger in #9319ModelAPIError when the OpenAI Responses API reports a failed response or an error stream event by @DouweM in #9321MistralError from the Mistral SDK to ModelHTTPError or ModelAPIError by @DouweM in #9307GoogleModel.count_tokens and XaiModel file uploads by @DouweM in #9308ClampOversizedMessages, SubAgents, and StepPersistence by @DouweM in #9026data validation errors under result.data so retry feedback keeps the failing input by @pydanty in #8669shell job log deleted mid-read as empty instead of failing the call by @dsfaccini in #9322turn_complete_reason as the realtime response's finish_reason by @DouweM in #9390request_limit by @DouweM in #9380SubAgent usage toward parent budgets by @DouweM in #9374Full Changelog: v2.51.0...v2.52.0
<!-- Release notes generated using configuration in .github/release.yml at 39328d5b0d4cce94d513b6afcd2b3191bd5708d5 -->
<!-- Release notes generated using configuration in .github/release.yml at 39328d5b0d4cce94d513b6afcd2b3191bd5708d5 -->
gemini-3.8-live ids, reject google_affective_dialog on Gemini 3.1 Flash Live and 3.8 Live at connect, and raise RealtimeError for Gemini Live close codes by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8761UserError for a realtime tool_choice that forces a tool call on OpenAI, Azure OpenAI, and xAI by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8755OpenAILiveModel by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8390context_window_used on realtime sessions, from GPT-Live's reported ratio or response usage by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8803RunContext copying overhead in capability hooks by @Kludex in https://github.com/pydantic/pydantic-ai/pull/8775provider_details on OpenAI Realtime tool-call responses and the response id on replies cut off by a drop or close() by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8762CompletedStreamedResponse replay by @Kludex in https://github.com/pydantic/pydantic-ai/pull/8799Agent.run() by @Kludex in https://github.com/pydantic/pydantic-ai/pull/8658Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.50.0...v2.51.0
gemini-3.8-live ids, reject google_affective_dialog on Gemini 3.1 Flash Live and 3.8 Live at connect, and raise RealtimeError for Gemini Live close codes by @DouweM in #8761UserError for a realtime tool_choice that forces a tool call on OpenAI, Azure OpenAI, and xAI by @DouweM in #8755OpenAILiveModel by @DouweM in #8390context_window_used on realtime sessions, from GPT-Live's reported ratio or response usage by @DouweM in #8803RunContext copying overhead in capability hooks by @Kludex in #8775provider_details on OpenAI Realtime tool-call responses and the response id on replies cut off by a drop or close() by @DouweM in #8762CompletedStreamedResponse replay by @Kludex in #8799Agent.run() by @Kludex in #8658Full Changelog: v2.50.0...v2.51.0
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
DecisionModel which route to take by name, with one label per route by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8733ModelSelectionContext.messages end with the request being routed, and add ModelSelectionContext.prompt by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8737decision_route_threshold by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8739service_tier in provider details by @pydanty in https://github.com/pydantic/pydantic-ai/pull/7945DecisionModel, a base for Decisions-protocol models, and make TypeSafeModel one by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8696RunContext.in_durable_context so hooks can tell they run in durable workflow code by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/8723gemini-3.8-live and gemini-3.8-live-extended-thinking realtime support by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8393DecisionModel's route fields with the route question under a route premise, with nested-field context and a done state after tool calls by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8749decide span for every request a DecisionModel sends by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8698OutputSpec[T] passed to Agent.run under mypy by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8730ThinkingParts in the history decision models judge by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8738RequestUsage.audio_seconds so duration-billed voice models are priced by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8427output_type as a route beside other routes, and rename ToolCallProposed to UnfillableRoute under a DecisionHandOff base by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8744wait_for_reply() no longer hangs on it by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8747thinking=False on OpenAI Realtime by sending reasoning.effort: 'none' by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8753context_window from genai-prices and document compacting a Jev conversation by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8740stream_audio() view so speaker-paced playback gets whole replies by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8750RealtimeSessionErrorEvent by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8752Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.49.0...v2.50.0
DecisionModel which route to take by name, with one label per route by @DouweM in #8733ModelSelectionContext.messages end with the request being routed, and add ModelSelectionContext.prompt by @DouweM in #8737decision_route_threshold by @DouweM in #8739service_tier in provider details by @pydanty in #7945DecisionModel, a base for Decisions-protocol models, and make TypeSafeModel one by @DouweM in #8696RunContext.in_durable_context so hooks can tell they run in durable workflow code by @mpfaffenberger in #8723gemini-3.8-live and gemini-3.8-live-extended-thinking realtime support by @DouweM in #8393DecisionModel's route fields with the route question under a route premise, with nested-field context and a done state after tool calls by @DouweM in #8749decide span for every request a DecisionModel sends by @DouweM in #8698OutputSpec[T] passed to Agent.run under mypy by @DouweM in #8730ThinkingParts in the history decision models judge by @DouweM in #8738RequestUsage.audio_seconds so duration-billed voice models are priced by @DouweM in #8427output_type as a route beside other routes, and rename ToolCallProposed to UnfillableRoute under a DecisionHandOff base by @DouweM in #8744wait_for_reply() no longer hangs on it by @DouweM in #8747thinking=False on OpenAI Realtime by sending reasoning.effort: 'none' by @DouweM in #8753context_window from genai-prices and document compacting a Jev conversation by @DouweM in #8740stream_audio() view so speaker-paced playback gets whole replies by @DouweM in #8750RealtimeSessionErrorEvent by @DouweM in #8752Full Changelog: v2.49.0...v2.50.0
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
GitHubCopilotOAuthFlow for device authorization by @Kludex in https://github.com/pydantic/pydantic-ai/pull/8618BoolCriteria to say what a bool field's yes and no mean, and let a True/False Enum do the same by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8586None as the "none of these" option in TypeSafeModel by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8684Choice in TypeSafeModel by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8686RealtimeSession.wait_for_reply() by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8514OpenAIChatModel logprobs in provider_details['logprobs'] by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8653gpt-6-sol, gpt-6-luna, and gpt-6-astra on Bedrock Converse by @sevakva in https://github.com/pydantic/pydantic-ai/pull/8656@GraphBuilder.stream node errors in-context during graph.iter() by @pydanty in https://github.com/pydantic/pydantic-ai/pull/8304gs:// references as fileData in GoogleImageGenerationModel on Vertex AI by @dorukgezici in https://github.com/pydantic/pydantic-ai/pull/8225Annotated model types by @ikriv in https://github.com/pydantic/pydantic-ai/pull/8608None in a list of output types as | None so output_type=[Foo, Bar, None] passes pyright by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8641google_proactive_audio, which no Gemini Live session could ever connect with by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8394temperature and top_p for OpenAI GPT-5.6 and GPT-6 on Bedrock Converse instead of failing with a 400 by @kimnamu in https://github.com/pydantic/pydantic-ai/pull/8668TypeSafeModel answers "None of these" for an optional field by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8685send_audio(iterable) cleanly on close by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8138Annotated metadata on the members of an X | Y output_type by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8687TypeSafeModel answers "None of these" for every field under it by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8697Annotated, Literal and union output_types as PEP 747 TypeForms, and bump pyright to 1.1.414 by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8690RunContext.tracer, trace_include_content and instrumentation_version follow an explicit Instrumentation capability by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8706OpenAICodexModel instead of failing with a 400 by @aweis89 in https://github.com/pydantic/pydantic-ai/pull/8693Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.48.0...v2.49.0
GitHubCopilotOAuthFlow for device authorization by @Kludex in #8618BoolCriteria to say what a bool field's yes and no mean, and let a True/False Enum do the same by @DouweM in #8586None as the "none of these" option in TypeSafeModel by @DouweM in #8684Choice in TypeSafeModel by @DouweM in #8686RealtimeSession.wait_for_reply() by @DouweM in #8514OpenAIChatModel logprobs in provider_details['logprobs'] by @adtyavrdhn in #8653gpt-6-sol, gpt-6-luna, and gpt-6-astra on Bedrock Converse by @sevakva in #8656@GraphBuilder.stream node errors in-context during graph.iter() by @pydanty in #8304gs:// references as fileData in GoogleImageGenerationModel on Vertex AI by @dorukgezici in #8225Annotated model types by @ikriv in #8608None in a list of output types as | None so output_type=[Foo, Bar, None] passes pyright by @DouweM in #8641google_proactive_audio, which no Gemini Live session could ever connect with by @DouweM in #8394temperature and top_p for OpenAI GPT-5.6 and GPT-6 on Bedrock Converse instead of failing with a 400 by @kimnamu in #8668TypeSafeModel answers "None of these" for an optional field by @DouweM in #8685send_audio(iterable) cleanly on close by @DouweM in #8138Annotated metadata on the members of an X | Y output_type by @DouweM in #8687TypeSafeModel answers "None of these" for every field under it by @DouweM in #8697Annotated, Literal and union output_types as PEP 747 TypeForms, and bump pyright to 1.1.414 by @DouweM in #8690RunContext.tracer, trace_include_content and instrumentation_version follow an explicit Instrumentation capability by @DouweM in #8706OpenAICodexModel instead of failing with a 400 by @aweis89 in #8693Full Changelog: v2.48.0...v2.49.0
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
genai-prices 0.1.7 and new OpenAI audio models by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8617gpt-6-sol and gpt-6-luna model support by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8635claude-opus-5-5) support by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8637UIMessage.id across Vercel AI load_messages and dump_messages by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8623Message.id across AGUIAdapter.load_messages and dump_messages by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8632genai-prices to 0.1.8 by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8648Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.47.0...v2.48.0
genai-prices 0.1.7 and new OpenAI audio models by @adtyavrdhn in #8617gpt-6-sol and gpt-6-luna model support by @DouweM in #8635claude-opus-5-5) support by @DouweM in #8637UIMessage.id across Vercel AI load_messages and dump_messages by @adtyavrdhn in #8623Message.id across AGUIAdapter.load_messages and dump_messages by @adtyavrdhn in #8632Full Changelog: v2.47.0...v2.48.0
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
None output route None rather than NoneType by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8590UserPromptPart.content is not a str or a sequence, instead of silently sending a dict's keys by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8595TypeSafeModel can already answer by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8544tuple output field and a self-contained model instead of crashing by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8537None be a route TypeSafeModel can pick by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8540Choices set describe itself as a TypeSafeModel route by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8541None route and a None option that carry a description by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8598TypeSafeModel request that fills it by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8589ag-ui-protocol to <1 by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8579Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.46.0...v2.47.0
None output route None rather than NoneType by @DouweM in #8590UserPromptPart.content is not a str or a sequence, instead of silently sending a dict's keys by @DouweM in #8595tuple output field and a self-contained model instead of crashing by @DouweM in #8537None be a route TypeSafeModel can pick by @DouweM in #8540Choices set describe itself as a TypeSafeModel route by @DouweM in #8541None route and a None option that carry a description by @DouweM in #8598TypeSafeModel request that fills it by @DouweM in #8589ag-ui-protocol to <1 by @adtyavrdhn in #8579Full Changelog: v2.46.0...v2.47.0
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
TypeSafeModel fill a tool's arguments when Jev can express them by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8501RealtimeSession.wait_for_playback() and let the docs examples finish the reply before closing by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8141supports_text_output to ModelProfile, and run LLMJudge and GEval on a model without it by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8480typesafe_boolean_threshold for what a yes/no has to be before it is True by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8505TypeSafeModel fill a union of output types by choosing the type first by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8481event_stream_topic to TemporalDurability to stream agent events via Workflow Streams by @brianstrauch in https://github.com/pydantic/pydantic-ai/pull/6639Enum's options by its member docstrings when it mixes in UseEnumMemberDocstrings by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8479Choices helper for a set of described options built at run time by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8530TypeSafeModel by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8484ToolReturnPart when a realtime tool raises, and keep a tool call and its speech in one ModelResponse by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8135ToolDefinition in CombinedToolset and FunctionToolset by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8082ModelRetry when web_fetch_tool gets a URL httpx2 rejects as invalid by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8521usage.cost and UsageLimits.cost_limit work in a session by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8136Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.45.0...v2.46.0
TypeSafeModel fill a tool's arguments when Jev can express them by @DouweM in #8501RealtimeSession.wait_for_playback() and let the docs examples finish the reply before closing by @DouweM in #8141supports_text_output to ModelProfile, and run LLMJudge and GEval on a model without it by @DouweM in #8480typesafe_boolean_threshold for what a yes/no has to be before it is True by @DouweM in #8505TypeSafeModel fill a union of output types by choosing the type first by @DouweM in #8481event_stream_topic to TemporalDurability to stream agent events via Workflow Streams by @brianstrauch in #6639Enum's options by its member docstrings when it mixes in UseEnumMemberDocstrings by @DouweM in #8479Choices helper for a set of described options built at run time by @DouweM in #8530TypeSafeModel by @DouweM in #8484ToolReturnPart when a realtime tool raises, and keep a tool call and its speech in one ModelResponse by @DouweM in #8135ToolDefinition in CombinedToolset and FunctionToolset by @adtyavrdhn in #8082ModelRetry when web_fetch_tool gets a URL httpx2 rejects as invalid by @DouweM in #8521usage.cost and UsageLimits.cost_limit work in a session by @DouweM in #8136Full Changelog: v2.45.0...v2.46.0
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
TypeSafeModel for TypeSafe's Jev by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8450xhigh effort through on Bedrock when the model profile supports it by @willfrey in https://github.com/pydantic/pydantic-ai/pull/8392gpt-5.6-sol, gpt-5.6-luna, and gpt-5.6-terra on Bedrock Converse by @pydanty in https://github.com/pydantic/pydantic-ai/pull/7825DynamicToolset once per durable run instead of inside every durable unit by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8455MCPSamplingModel by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8466httpx in pydantic_ai.mcp, which a FastMCP 4 install does not ship by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8461Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.44.0...v2.45.0
TypeSafeModel for TypeSafe's Jev by @adtyavrdhn in #8450xhigh effort through on Bedrock when the model profile supports it by @willfrey in #8392gpt-5.6-sol, gpt-5.6-luna, and gpt-5.6-terra on Bedrock Converse by @pydanty in #7825DynamicToolset once per durable run instead of inside every durable unit by @DouweM in #8455MCPSamplingModel by @DouweM in #8466httpx in pydantic_ai.mcp, which a FastMCP 4 install does not ship by @DouweM in #8461Full Changelog: v2.44.0...v2.45.0
This release fixes four security issues, all of them reached through web_fetch_tool or OpenTelemetry instrumentation. See each advisory for full detai
This release fixes four security issues, all of them reached through web_fetch_tool or OpenTelemetry instrumentation. See each advisory for full details and affected versions.
FileUrl(force_download='allow-local') or web_fetch_tool(allow_local_urls=True). Both are off by default. Reported by @euriconicacio. (#8401)web_fetch processed responses in superlinear time on the event loop, in both the HTML conversion and the charset decode, so a single attacker-chosen page could stall every agent in the process. Reported by @BrianWillows. (#8397, #8418, #8433)web_fetch_tool's domain lists were compared as written rather than in the form the resolver uses, so a blocked domain could be reached under another spelling. (#8407, #8421)InstrumentationSettings(include_content=False), spans still carried exceptions, error statuses, instructions and the output template. Reported by @BrianWillows. (#8403, #8408, #8419, #8428)Patched in 2.44.0 (v2) and 1.107.6 (v1).
RunContext.enqueue() safe from worker threads by @adtyavrdhn in #7758Content-Type on UI adapter requests by @DouweM in #8396@durable_operation called from a per-request hook, instead of silently running it inline by @DouweM in #8395AgentRunResult a stable serialized shape, and settle a finished stream into one by @DouweM in #8269Storage page so persistence is findable by @DouweM in #8336EnqueuedMessagesEvent when a realtime session delivers enqueued content by @DouweM in #8134blocked_domains to OpenAI web search by @adtyavrdhn in #8323tool_search pairing in AG-UI by @adtyavrdhn in #8313Agent.from_spec() construct without a model, deferring the requirement to run time by @DouweM in #8339RealtimeSession.close() finish its teardown when the closing task is cancelled by @DouweM in #8142prepare_tools over every tool the availability gate admits by @DouweM in #8071Full Changelog: v2.43.0...v2.44.0
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
clai sessions with it by @DouweM in https://github.com/pydantic/pydantic-ai/pull/7447OpenAIChatModel by @KaranJayakumar in https://github.com/pydantic/pydantic-ai/pull/8235Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.42.0...v2.43.0
OpenAIChatModel by @KaranJayakumar in #8235Full Changelog: v2.42.0...v2.43.0
One column per month.