P

PydanticAI

P
PydanticAI AI v2.22.0

v2.22.0 (2026-07-31)

What's Changed ๐Ÿš€ Features Allow MCPToolset clients to skip optional MCP tasks via prefer_tasks by @adtyavrdhn in #6851 Default Gemini VALIDATED tool mode on supported models by @hramezani in #6353 Stop advertising tool search for capability-owned deferred tools on Anthropic by @DouweM in #6770 Send mid-conversation system prompts as native system messages on Anthropic by @DouweM in #6765 Add RunCoโ€ฆ

P
PydanticAI AI v2.21.0

v2.21.0 (2026-07-29)

What's Changed ๐Ÿš€ Features feat(usage): add per_request_input_tokens_limit to UsageLimits by @Oxygen56 in #5907 ๐Ÿ› Bug Fixes Refresh KnownModelName from Gateway probes and stable Google image IDs by @adtyavrdhn in #6806 Full Changelog: v2.20.0...v2.21.0

P
PydanticAI AI v2.20.0

v2.20.0 (2026-07-28)

What's Changed ๐Ÿš€ Features Add Claude Opus 5 (claude-opus-5) support by @dsfaccini in #6723 Add OpenAI Responses API reasoning.context support (default all_turns) for the gpt-5.4/gpt-5.5/gpt-5.6 families by @pydanty[bot] in #6673 ๐Ÿ› Bug Fixes Preserve arbitrary RequestUsage fields across serialization by @alexmojaki in #6685 Capture Anthropic thinking tokens in usage details by @jakub-orsula-parrotโ€ฆ

P
PydanticAI AI v2.19.0

v2.19.0 (2026-07-27)

What's Changed ๐Ÿš€ Features Add headers and retry_after to ModelHTTPError, populate from all provider SDKs by @dmontagu in #6733 ๐Ÿ› Bug Fixes Re-assert absorbed external cancellation at run step boundaries by @DouweM in #6496 ๐Ÿ“ฆ Dependencies Update FastMCP dependency range to <4 by @adtyavrdhn in #6737 Full Changelog: v2.18.0...v2.19.0

P
PydanticAI AI v2.18.0

v2.18.0 (2026-07-24)

What's Changed ๐Ÿš€ Features Add AdvisorTool support for Anthropic and OpenRouter by @adtyavrdhn in #6605 Add 'us'/'eu' multi-region locations to GoogleCloudProvider location type by @pydanty[bot] in #6715 Add external_web_access option to WebSearchTool for OpenAI Responses by @pydanty[bot] in #6710 Add BedrockMantleProvider and normalize response-scoped tool-call IDs by @dsfaccini in #6538 ๐Ÿ› Bug Fixโ€ฆ

P
PydanticAI AI v2.17.0

v2.17.0 (2026-07-23)

What's Changed ๐Ÿš€ Features Make RequestUsage and RunUsage support arbitrary fields for upcoming genai-prices by @alexmojaki in #6683 Cache per-message OTel serialization to avoid O(nยฒ) instrumentation cost by @dsfaccini in #6635 ๐Ÿ› Bug Fixes Fix ContentFilterError for real Model Armor response blocks (finishReason: MODEL_ARMOR) and record moderation wire-truth cassettes by @dsfaccini in #6679 Full Cโ€ฆ

P
PydanticAI AI v2.16.0

v2.16.0 (2026-07-22)

What's Changed ๐Ÿš€ Features Add mistral_prompt_cache_key setting and pass parallel_tool_calls to the Mistral SDK by @lionpeloux in #6654 Add ToolFailed for model-visible failures without retries by @adtyavrdhn in #5585 Add optional run_id= to agent runs, durable wrappers, and UI adapters by @grahamcracker1234 in #6615 Hoist openai_moderation to OpenAIChatModelSettings and expose Chat Completions modโ€ฆ

P
PydanticAI AI v2.15.0

v2.15.0 (2026-07-21)

What's Changed ๐Ÿš€ Features feat(openai): support explicit prompt caching for gpt-5.6 by @Wh1isper in #6423 Inline text-like files in MistralModel prompts by @pulphix in #6556 Support overriding the tool-retry budget at run/iter/override time by @dsfaccini in #6072 Support DynamicCapability toolsets in durable execution and wrap DynamicToolset in DBOS steps and Prefect tasks by @DouweM in #6623 Addโ€ฆ

P
PydanticAI AI v2.14.1

v2.14.1 (2026-07-20)

What's Changed ๐Ÿ› Bug Fixes Always fetch MCP instructions via a durable step under DBOSDurability by @DouweM in #6624 Temporarily withdraw durable wrapper-agent deprecations by @dsfaccini in #6625 Full Changelog: v2.14.0...v2.14.1

P
PydanticAI AI v2.14.0

v2.14.0 (2026-07-20)

What's Changed ๐Ÿš€ Features feat(mistral): add reasoning_effort support via thinking settings by @YHallouard in #5294 Add TemporalDurability, DBOSDurability and PrefectDurability capabilities to replace the deprecated wrapper agents by @DouweM in #4977 ๐Ÿ› Bug Fixes Remove shut-down Gemini models gemini-2.5-flash-lite-preview-09-2025 and gemini-3.1-flash-lite-preview by @adtyavrdhn in #6606 Full Changโ€ฆ

P
PydanticAI AI v2.13.0

v2.13.0 (2026-07-17)

What's Changed ๐Ÿš€ Features Add include_model_request_parameters instrumentation setting to omit the model_request_parameters span attribute by @dsfaccini in #6488 Add RaiseContentFilterError capability to raise content filter error for non-empty content filter responses by @dsfaccini in #6167 feat(usage): add cache_hit_ratio property to RequestUsage and RunUsage by @DouweM in #6529 Add get_model, rโ€ฆ

P
PydanticAI AI v2.12.0

v2.12.0 (2026-07-16)

What's Changed ๐Ÿš€ Features Add Moonshot AI kimi-k3 model by @dsfaccini in #6551 Emit EnqueuedMessagesEvent when enqueued messages are delivered into the run by @DouweM in #6256 feat: add DeferredToolCallEvent and DeferredToolResultEvent to AgentStreamEvent by @YHallouard in #5588 ๐Ÿ› Bug Fixes Fix ToolReturnPart serialization to use field aliases so wire output matches return_schema by @pydanty[bot]โ€ฆ

P
PydanticAI AI v2.11.0

v2.11.0 (2026-07-15)

What's Changed ๐Ÿš€ Features feat: export HistoryProcessor and add actionable hints to usage-limit and tool-retry errors by @DouweM in #6346 ๐Ÿ› Bug Fixes Fix MistralStreamedResponse streamed number/integer validation to accept int-valued numbers and reject bools by @pydanty[bot] in #6479 fix(onboarding): suggest Agent('test') when provider credentials are missing by @DouweM in #6342 fix(anthropic): trโ€ฆ

P
PydanticAI AI v2.10.0

v2.10.0 (2026-07-14)

What's Changed ๐Ÿš€ Features Make message_history provider-valid out of the box (repair tool-call/result pairing) by @DouweM in #6319 Add support for OpenAI background mode and handle Anthropic stop_reason=pause_turn by @DouweM in #6303 ๐Ÿ› Bug Fixes Fix has_values() returning True for all-zero usage details by @sean-kim05 in #6466 Fix RenamedToolset silently dropping a tool on a name collision by @seaโ€ฆ

P
PydanticAI AI v2.9.1

v2.9.1 (2026-07-13)

What's Changed ๐Ÿ› Bug Fixes Fix typed composition members recursion in JsonSchemaTransformer by @pydanty[bot] in #6440 fix: handle int timeout values in MistralModel._get_timeout_ms by @Ricardo-M-L in #5019 Remove retired models from KnownModelName and restore Gateway-supported models by @adtyavrdhn in #5843 ๐Ÿ“ฆ Dependencies fix(deps): bump soupsieve to 2.8.4 to fix ReDoS (CVE-2026-49477) by @hramezaโ€ฆ

P
PydanticAI AI v2.5.0

v2.5.0 (2026-07-03)

What's Changed ๐Ÿ›ก๏ธ Security This release included the fix for GHSA-jpr8-2v3g-wgf9 (moderate, CWE-863), carried by the sanitize_messages change in #6169. On the AG-UI serving path (Agent.to_ag_ui() / AGUIAdapter), the dangling-tool-call strip anchored to a pre-sanitization index, so a dropped trailing client message could re-expose a preceding unresolved tool call for execution. The v1 line is patchโ€ฆ

P
PydanticAI AI v2.9.0

v2.9.0 (2026-07-10)

What's Changed ๐Ÿ›ก๏ธ Security A moderate advisory, GHSA-jpr8-2v3g-wgf9 (CWE-863), affecting the AG-UI UIAdapter.sanitize_messages dangling-tool-call strip, was fixed in 2.5.0 and backported to 1.107.1 on the v1 line. If you are on 2.5.0 or later you already have the fix; this note calls it out now that the advisory is public. Affected: pydantic-ai / pydantic-ai-slim >= 2.0.0, < 2.5.0 (v2) and >= 1.88โ€ฆ

P
PydanticAI AI v1.107.1

v1.107.1 (2026-07-10)

What's Changed ๐Ÿ›ก๏ธ Security This release patches GHSA-jpr8-2v3g-wgf9 (moderate, CWE-863) on the v1 line. On the AG-UI serving path (Agent.to_ag_ui() / AGUIAdapter), UIAdapter.sanitize_messages anchored its dangling-tool-call strip to an index computed before sanitization. When a trailing client message was dropped during sanitization (for example a client system message under the default manage_sysโ€ฆ

P
PydanticAI AI v2.8.0

v2.8.0 (2026-07-09)

What's Changed ๐Ÿš€ Features Allow to_cli() to pass model for unset-model agents by @hramezani in #6384 Bump bundled chat UI to 2.0.0 and target sdk_version=7 in Agent.to_web() by @dsfaccini in #6296 ๐Ÿ› Bug Fixes fix: validate Tool max_retries and timeout parameters by @isheng-eqi in #6375 fix: validate ToolOutput max_retries by @isheng-eqi in #6377 fix: validate Agent tool_timeout by @isheng-eqi in #โ€ฆ

P
PydanticAI AI v2.7.0

v2.7.0 (2026-07-08)

What's Changed ๐Ÿš€ Features Support azure-responses:[model-id] shorthand by @hramezani in #6355 Add xAI grok-4.5 model by @dsfaccini in #6362 ๐Ÿ› Bug Fixes fix: handle boolean JSON Schema nodes in function signature walker by @hramezani in #6314 fix(gateway): preserve HTTPX event hooks by @VectorPeak in #6327 Allow override(model=...) on an agent with no model set by @hramezani in #6357 Disable documeโ€ฆ

P
PydanticAI AI v2.6.0

v2.6.0 (2026-07-07)

What's Changed ๐Ÿš€ Features Record time-to-first-token for streaming model requests by @dmontagu in #5967 feat: Add files support to CodeExecutionTool for Anthropic and OpenAI by @HenryYYang in #4338 Add Bedrock model profiles for Writer, Z.AI, and Moonshot AI, and refresh LatestBedrockModelNames by @DouweM in #6318 ๐Ÿ› Bug Fixes Forward WebSearchTool domain filters to Groq search_settings by @Iam-Milโ€ฆ

P
PydanticAI AI v2.5.1

v2.5.1 (2026-07-06)

What's Changed ๐Ÿ› Bug Fixes fix(bedrock): handle toolResult attachment co-location per-model via bedrock_tool_result_colocatable_content by @Hasnaathussain in #6098 fix(groq): map unified thinking setting to Groq reasoning_effort by @dsfaccini in #6231 fix(evals): reject non-positive OnlineEvaluator.max_concurrency by @VectorPeak in #6267 fix: write relative schema refs for AgentSpec files by @Vectโ€ฆ

P
PydanticAI AI v2.4.0

v2.4.0 (2026-07-02)

What's Changed ๐Ÿš€ Features Split preserve_file_data into allow_uploaded_files (inbound security) and an AG-UI representation opt-in by @DouweM in #6232 Add GEval evaluator and standard quality metric rubrics for LLMJudge by @dmontagu in #5129 Add agentic span-based evaluators (ToolCorrectness, TrajectoryMatch, ArgumentCorrectness, MaxToolCalls, MaxModelRequests) by @dmontagu in #5130 ๐Ÿ› Bug Fixes fiโ€ฆ

P
PydanticAI AI v2.3.0

v2.3.0 (2026-07-01)

What's Changed ๐Ÿš€ Features Add native Z.AI (Zhipu AI) provider with thinking support by @eliasaronson in #4273 ๐Ÿ› Bug Fixes fix(test): set provider_name on TestModel non-streaming responses by @syf2211 in #6066 Keep Bedrock tool results non-empty for empty lists by @Whning0513 in #6155 fix(huggingface): don't silently drop file content in tool returns by @HaozheZhang6 in #5881 fix: skip OpenAI thinkโ€ฆ

P
PydanticAI AI v2.2.0

v2.2.0 (2026-06-30)

What's Changed ๐Ÿš€ Features feat: add TwelveLabs Pegasus video-understanding example by @mohit-twelvelabs in #6061 Add Claude Sonnet 5 (claude-sonnet-5) support by @dsfaccini in #6161 Allow factory functions as lifecycle arg for Dataset.evaluate by @nlsfnr in #6107 feat: Add prompt and completions cost fields to OpenRouter by @ali-corpo in #4899 feat: add retry_options parameter to GoogleProvider byโ€ฆ

P
PydanticAI AI v2.1.0

v2.1.0 (2026-06-29)

What's Changed ๐Ÿš€ Features feat: Add Anthropic _20260209 web tools with server-tool replay by @adtyavrdhn in #4844 Serialize instrumentation message attributes with to_json instead of json.dumps by @Kludex in #6045 Add TypeAdapter for EvaluatorContext by @hon-gyu in #3373 ๐Ÿ› Bug Fixes Convert ExceptionGroup-wrapped tool errors to ModelRetry in MCPToolset by @dmontagu in #6004 fix: prevent cancel() fโ€ฆ

P
PydanticAI AI v2.0.0

v2.0.0 (2026-06-23)

๐ŸŽ‰ Pydantic AI V2.0 is here! After seven betas, Pydantic AI V2 is now stable. V2 leans into a harness-first design with capabilities as a core primitive โ€” a single composable unit that bundles an agent's tools, hooks, instructions, and model settings, reaching every layer of the agent through one concept. Install it with: uv add pydantic-ai See the Upgrade Guide for everything that's changed and thโ€ฆ

P
PydanticAI AI v2.0.0b7

v2.0.0b7 (2026-06-10)

๐Ÿš€ Pydantic AI V2 Beta 7 is here! For more information on Pydantic AI V2, see the release notes for v2.0.0b1 and the Upgrade Guide. Beta 7 adds no new breaking or v2-specific changes, but pulls in these changes from v1.107.0: What's Changed ๐Ÿ›ก๏ธ Security Handle UploadedFile consistently with FileUrl in UI adapters by @dsfaccini in #5772 Security advisory: VercelAIAdapter trusts client-controlled provโ€ฆ

P
PydanticAI AI v1.107.0

v1.107.0 (2026-06-10)

What's Changed ๐Ÿ›ก๏ธ Security Handle UploadedFile consistently with FileUrl in UI adapters by @dsfaccini in #5772 Security advisory: VercelAIAdapter trusts client-controlled provider metadata to construct UploadedFile references (confused-deputy file read) GHSA-h7p7-w5gc-xj3w This fix went out in v1.106.0 and v2.0.0b6. You are affected only if your application passes untrusted client-submitted messagโ€ฆ

P
PydanticAI AI v2.0.0b6

v2.0.0b6 (2026-06-04)

๐Ÿš€ Pydantic AI V2 Beta 6 is here! For more information on Pydantic AI V2, see the release notes for v2.0.0b1 and the Upgrade Guide. Beta 6 adds no new breaking or v2-specific changes, but pulls in these changes from v1.106.0: What's Changed ๐Ÿ›ก๏ธ Security Handle UploadedFile consistently with FileUrl in UI adapters by @dsfaccini in #5772 Security advisory: VercelAIAdapter trusts client-controlled provโ€ฆ