P

PydanticAI

P
PydanticAI AI v2.27.0

v2.27.0 (2026-08-07)

What's Changed πŸš€ Features Add xai_agent_count to XaiModelSettings by @pydanty[bot] in #7155 Round-trip CompactionPart through the Vercel AI and AG-UI adapters by @DouweM in #7287 Add SnowflakeModel and SnowflakeProvider for Snowflake Cortex by @ayirpown in #6150 πŸ› Bug Fixes Honor include_binary_content=False in every OTel serialization sink by @dsfaccini in #7131 Keep ToolReturn.tools in the redac…

P
PydanticAI AI v2.24.0

v2.24.0 (2026-08-04)

πŸ›‘οΈ Security This release included a fix for an availability vulnerability β€” unbounded memory use when downloading remote content via the local web_fetch tool or FileUrl media downloads β€” now disclosed as GHSA-v2xh-2vp8-57h8. Fixed in 2.24.0 (#7141); v1 users should upgrade to 1.107.2 or later. What's Changed πŸ› Bug Fixes Fix Google provider dropping an explicit timeout=0 by @pydanty[bot] in #7114 F…

P
PydanticAI AI v1.107.2

v1.107.2 (2026-08-07)

πŸ›‘οΈ Security Fixes an availability vulnerability: unbounded memory use when downloading remote content via the local web_fetch tool or FileUrl media downloads, which could exhaust process memory and crash the worker. Patched versions enforce a default 50 MiB download cap. See GHSA-v2xh-2vp8-57h8. Patched in 1.107.2 (v1) and 2.24.0 (v2). What's Changed πŸ› Bug Fixes Bound HTTP response body sizes for…

P
PydanticAI AI v2.26.0

v2.26.0 (2026-08-06)

What's Changed πŸš€ Features Support hiding function tools until revealed β€” via tool search, load_capability, or ToolReturn.tools β€” using each provider's native deferral/addition channel by @DouweM in #7104 Add first-party run cancellation: AgentRun.cancel(), RunContext.cancel(), RunCancelled by @DouweM in #6497 Add Model.resolve_prompt_cache_retention() to resolve effective prompt-cache retention fr…

P
PydanticAI AI v2.25.0

v2.25.0 (2026-08-05)

What's Changed πŸš€ Features Forward xAI FileSearchTool collections search options by @pydanty[bot] in #7154 πŸ› Bug Fixes fix(azure): send max_tokens for Mistral models, not max_completion_tokens by @feiiiiii5 in #6929 Omit server attributes for a malformed base_url port and forward base_url through WrapperModel by @dsfaccini in #7136 Fix thinking="minimal" for GPT-5.6 models by @daikeren in #7082 Deg…

P
PydanticAI AI v2.23.0

v2.23.0 (2026-08-03)

What's Changed πŸš€ Features Add Bedrock support for ModelSettings.extra_headers by @kkauy in #4825 Restore stable gemini-3-pro-image and gemini-3.1-flash-image Gateway aliases by @adtyavrdhn in #7069 Add cost to RunUsage and cost_limit to UsageLimits by @Kludex in #2684 Add ToolAvailabilityDeltaPart with native tool_addition and additional_tools rendering by @DouweM in #6793 πŸ› Bug Fixes Validate bed…

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…