Update dependency pydantic-ai to v2 - #87
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
renovate
Bot
force-pushed
the
renovate/pydantic-ai-2.x
branch
3 times, most recently
from
July 29, 2026 04:32
e339f24 to
9502f46
Compare
renovate
Bot
force-pushed
the
renovate/pydantic-ai-2.x
branch
from
July 30, 2026 04:33
9502f46 to
bb68c2a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
<2.0.0→<2.11.1Release Notes
pydantic/pydantic-ai (pydantic-ai)
v2.11.0: (2026-07-15)Compare Source
What's Changed
🚀 Features
HistoryProcessorand add actionable hints to usage-limit and tool-retry errors by @DouweM in #6346🐛 Bug Fixes
MistralStreamedResponsestreamed number/integer validation to accept int-valued numbers and reject bools by @pydanty[bot] in #6479Agent('test')when provider credentials are missing by @DouweM in #6342profile={"default_structured_output_mode": "native"}by @dsfaccini in #6521profile={'default_structured_output_mode': 'native'}sending untransformed schema by @dsfaccini in #6539Full Changelog: pydantic/pydantic-ai@v2.10.0...v2.11.0
v2.10.0: (2026-07-14)Compare Source
What's Changed
🚀 Features
message_historyprovider-valid out of the box (repair tool-call/result pairing) by @DouweM in #6319stop_reason=pause_turnby @DouweM in #6303🐛 Bug Fixes
has_values()returningTruefor all-zero usagedetailsby @sean-kim05 in #6466RenamedToolsetsilently dropping a tool on a name collision by @sean-kim05 in #6462bytesin instrumentation serialization by @alexmojaki in #6483run_stream_syncby @adtyavrdhn in #6454ToolCallPartto the preceding reasoning message by @dsfaccini in #5924DeferredToolResultsresume when an output tool call was settled in the same batch as deferred calls by @DouweM in #6491📦 Dependencies
transformersfloor to >=5.5.0 for CVE-2026-5241 by @hramezani in #6482New Contributors
Full Changelog: pydantic/pydantic-ai@v2.9.1...v2.10.0
v2.9.1: (2026-07-13)Compare Source
What's Changed
🐛 Bug Fixes
JsonSchemaTransformerby @pydanty[bot] in #6440MistralModel._get_timeout_msby @Ricardo-M-L in #5019KnownModelNameand restore Gateway-supported models by @adtyavrdhn in #5843📦 Dependencies
Full Changelog: pydantic/pydantic-ai@v2.9.0...v2.9.1
v2.9.0: (2026-07-10)Compare Source
What's Changed
🛡️ Security
A moderate advisory, GHSA-jpr8-2v3g-wgf9 (CWE-863), affecting the AG-UI
UIAdapter.sanitize_messagesdangling-tool-call strip, was fixed in2.5.0and backported to1.107.1on the v1 line. If you are on2.5.0or later you already have the fix; this note calls it out now that the advisory is public.pydantic-ai/pydantic-ai-slim>= 2.0.0, < 2.5.0(v2) and>= 1.88.0, < 1.107.1(v1)2.5.0(v2) and1.107.1(v1)requires_approval=True/ApprovalRequiredToolset, or if your tool handlers validate their arguments and enforce authorization themselves.🚀 Features
/usageslash command toclaiCLI for cumulative token usage by @adtyavrdhn in #6245RunContext): expose the run'susage_limitsto tools and capabilities by @DouweM in #6341🐛 Bug Fixes
UploadedFileby @gaurav0107 in #5815repr()crash on message parts whose field!=returns a non-bool (#6415) by @hramezani in #6421MCPToolseton theDBOSAgentwrapper path by @dsfaccini in #6406capture_run_messagescapture correctly (#1568) by @DouweM in #6345end_strategy='early'forNativeOutput,PromptedOutput, and image output by @DouweM in #6427New Contributors
Full Changelog: pydantic/pydantic-ai@v2.8.0...v2.9.0
v2.8.0: (2026-07-09)Compare Source
What's Changed
🚀 Features
to_cli()to passmodelfor unset-model agents by @hramezani in #63842.0.0and targetsdk_version=7inAgent.to_web()by @dsfaccini in #6296🐛 Bug Fixes
JsonSchemaTransformerto recurse intoallOfcomposition by @pydanty[bot] in #6394New Contributors
Full Changelog: pydantic/pydantic-ai@v2.7.0...v2.8.0
v2.7.0: (2026-07-08)Compare Source
What's Changed
🚀 Features
grok-4.5model by @dsfaccini in #6362🐛 Bug Fixes
override(model=...)on an agent with no model set by @hramezani in #6357AlibabaProvider(Chat Completions API) by @dsfaccini in #5727New Contributors
Full Changelog: pydantic/pydantic-ai@v2.6.0...v2.7.0
v2.6.0: (2026-07-07)Compare Source
What's Changed
🚀 Features
filessupport toCodeExecutionToolfor Anthropic and OpenAI by @HenryYYang in #4338LatestBedrockModelNamesby @DouweM in #6318🐛 Bug Fixes
WebSearchTooldomain filters to Groqsearch_settingsby @Iam-Mil in #6160max_runningby @VectorPeak in #6282PrefectAgentcache-key drift by @adtyavrdhn in #6313for_runonce per run and preserve resolved native tools underoverride(native_tools=...)by @DouweM in #6332📦 Dependencies
genai-pricesto 0.0.70 by @adtyavrdhn in #6330New Contributors
Full Changelog: pydantic/pydantic-ai@v2.5.1...v2.6.0
v2.5.1: (2026-07-06)Compare Source
What's Changed
🐛 Bug Fixes
toolResultattachment co-location per-model viabedrock_tool_result_colocatable_contentby @Hasnaathussain in #6098thinkingsetting to Groqreasoning_effortby @dsfaccini in #6231OnlineEvaluator.max_concurrencyby @VectorPeak in #6267FileUrl.force_downloadin UI round-trips by @HarperZ9 in #6205anthropic.claude-3-5-sonnet-20240620-v1:0by @ddanielcruzz in #6297NativeOutputdescription instead of last member's docstring by @dsfaccini in #6265toolResultturns by @DouweM in #6259ModelResponsefrom Mistral and Cohere request payloads by @DouweM in #6302New Contributors
Full Changelog: pydantic/pydantic-ai@v2.5.0...v2.5.1
v2.5.0: (2026-07-03)Compare Source
What's Changed
🚀 Features
sanitize_messagesfor inbound message-history hardening by @dsfaccini in #6169🐛 Bug Fixes
_clean_message_historymerges consecutiveModelRequests regardless ofconversation_id/metadataby @adtyavrdhn in #6221_build_promptsection order with its few-shot examples by @immuhammadfurqan in #6111thinkingsupport and add models toKnownModelNamesby @SuperMarioYL in #6208toolsetsin durable runs by @Trollgeir in #6076gen_ai.usage.details.*OTel attributes to fix double-counting by @adtyavrdhn in #6244anyioportal thread; fix asyncstream_textearly-break teardown by @DouweM in #6199bedrock_supported_media_kinds_in_tool_returnsfor Meta, Mistral, and Qwen by @DouweM in #6254📦 Dependencies
numpysource builds in examples by @hramezani in #6246New Contributors
Full Changelog: pydantic/pydantic-ai@v2.4.0...v2.5.0
v2.4.0: (2026-07-02)Compare Source
What's Changed
🚀 Features
preserve_file_dataintoallow_uploaded_files(inbound security) and an AG-UI representation opt-in by @DouweM in #6232GEvalevaluator and standard quality metric rubrics forLLMJudgeby @dmontagu in #5129🐛 Bug Fixes
XSearchToolhandle limit by @gyx09212214-prog in #5979process_tool_callsby @kratos0718 in #6189WebSearchTool.user_locationto xAI web search by @manan-tech in #6181KeyboardInterruptin synchronousrun_until_completewrappers by @DouweM in #6198descriptionfromToolSearchMatchby @serozhenka in #5654max_concurrencyby @VectorPeak in #6228run_stream_events()background task on first event iteration by @DouweM in #6234📦 Dependencies
genai-pricesto >=0.0.69 by @adtyavrdhn in #6212New Contributors
Full Changelog: pydantic/pydantic-ai@v2.3.0...v2.4.0
v2.3.0: (2026-07-01)Compare Source
What's Changed
🚀 Features
🐛 Bug Fixes
provider_nameonTestModelnon-streaming responses by @syf2211 in #6066defer_loadingwithouttool_searchon models without native tool search by @adtyavrdhn in #6144safe_to_jsonby @dsfaccini in #6073ToolReturnPart.contentvia aToolReturnContentdiscriminator by @DouweM in #6191AGUIAdapter.dump_messagesreorderingToolReturnPartafterUserPromptPartby @amarjaleelbanbhan in #5969new_messages()boundary by position so a rebuilt resumed request isn't leaked by @klplentific in #6034tool_kindin Vercel AI and AG-UI message round-trips by @adtyavrdhn in #5873get_toolscaching replay-deterministic by @dsfaccini in #5883FilePart.content.vendor_metadatain AG-UI and Vercel AI adapter round-trips by @Navaneethp007 in #6095get_instructionsin an activity under Temporal by @dsfaccini in #5925New Contributors
Full Changelog: pydantic/pydantic-ai@v2.2.0...v2.3.0
v2.2.0: (2026-06-30)Compare Source
What's Changed
🚀 Features
claude-sonnet-5) support by @dsfaccini in #6161retry_optionsparameter toGoogleProviderby @graydeon in #4966🐛 Bug Fixes
detailfromvendor_metadataforGroqModelandMistralModelby @pydanty[bot] in #6014group_by_temporalemitting first item alone when delayed past soft_max_interval by @pydanty[bot] in #5947output_audio_tokensin usage accumulation by @jnMetaCode in #4594TogetherProvider.model_profileagainst model names without a/by @immuhammadfurqan in #6113GoogleModel): includeCodeExecutionToolininclude_server_side_tool_invocationscheck by @aarsh767 in #6052downstream_join_iddouble-firing the join on a non-empty iterable by @clavedeluna in #6009output_audio_tokensaccumulation in_incr_usage_tokensby @dsfaccini in #6141ClosedResourceErrorwhen cancelling a graph run mid-send by @conradlee in #6149vendor_metadatathrough Vercel AI & AG-UI adapters by @Bartok9 in #5790strip_markdown_fencesby @CodingFeng101 in #6090/v1inbase_urlby @VectorPeak in #6142schema_pathhandling inDataset.to_fileby @VectorPeak in #6143depsdeserialization in non-streaming Temporal model-request activity by @dsfaccini in #5900New Contributors
Full Changelog: pydantic/pydantic-ai@v2.1.0...v2.2.0
v2.1.0: (2026-06-29)Compare Source
What's Changed
🚀 Features
_20260209web tools with server-tool replay by @adtyavrdhn in #4844🐛 Bug Fixes
ExceptionGroup-wrapped tool errors toModelRetryinMCPToolsetby @dmontagu in #6004cancel()from flipping complete state on finished stream by @Oxygen56 in #5795PydanticAIPlugin.__init__by @syf2211 in #6065New Contributors
Full Changelog: pydantic/pydantic-ai@v2.0.0...v2.1.0
v2.0.0: (2026-06-23)Compare Source
🎉 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:
See the Upgrade Guide for everything that's changed and the recommended path from V1.
What's Changed
🚀 Features
gemini-embedding-2embedding model by @dsfaccini in #5887DeferredToolsinAGUIAdapterby @jjmllr in #5441google_tasktext-prefix conditioning forgemini-embedding-2embeddings by @dsfaccini in #5894xai_max_turnstoXaiModelSettingsby @manan-tech in #5978🐛 Bug Fixes
function_calling_configwithout function declarations by @glendigity in #5791UploadedFileparts toinput_imageby @Oxygen56 in #5809thinkinghandling for Groq qwen3 and Cerebrasgpt-ossby @dsfaccini in #5850Evaluatoroutputs by @alexmojaki in #5863AnthropicModel.count_tokensdivergence onToolSearchToolreplay history by @dsfaccini in #5855reasoning_contenton synthesized tool-call turns for DeepSeek thinking models by @adtyavrdhn in #5842UploadedFile.provider_namein tool returns and consolidate the guard intoModel._validate_uploaded_file_providerby @Oxygen56 in #5860zai-glmreasoning in<think>tags and bump tozai-glm-4.7by @dsfaccini in #5891GoogleModelstreaming chunks by @dsfaccini in #5886output_audio_tokensinRunUsageby @HaozheZhang6 in #5904kinddiscriminator in text output by @ret2libc in #5845additionalModelRequestFieldsin Bedrockcount_tokensby @dsfaccini in #5910MCPToolset(http_client=...)crash on FastMCP'sfollow_redirectskwarg by @he-yufeng in #5694tool_choicefromModelSettingsto v2 chat API by @Julien-ser in #5833max_tokenstomax_completion_tokensormax_tokensviaOpenAIModelProfileflag by @dsfaccini in #5926top_kmodel setting to BedrockadditionalModelRequestFieldsby @dsfaccini in #5922FallbackModeldeclaring an unassigned_model_namedataclass field by @dorukgezici in #5932groq_reasoning_effortsetting by @Oxygen56 in #5797reasoning_effort='none'for Cerebras, deprecatecerebras_disable_reasoning, addcerebras_clear_thinkingby @dsfaccini in #5897New Contributors
Full Changelog: pydantic/pydantic-ai@v2.0.0b7...v2.0.0
v1.107.1: (2026-07-10)Compare Source
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_messagesanchored its dangling-tool-call strip to an index computed before sanitization. When a trailing client message was dropped during sanitization (for example a clientsystemmessage under the defaultmanage_system_prompt='server'), a preceding assistant response carrying an unresolved tool call could be re-exposed as the new tail and executed with client-chosen arguments.pydantic-ai/pydantic-ai-slim>= 1.88.0, < 1.107.1(v1) and>= 2.0.0, < 2.5.0(v2)1.107.1(v1) and2.5.0(v2)requires_approval=True/ApprovalRequiredToolset, or if your tool handlers validate their arguments and enforce authorization themselves.See the advisory for details and workarounds.
🐛 Bug Fixes
sanitize_messagestail handling when a trailing client message is dropped by @dsfaccini in #6407Full Changelog: pydantic/pydantic-ai@v1.107.0...v1.107.1
Configuration
📅 Schedule: (in timezone Europe/Zurich)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.