Skip to content

chore(deps): bump pydantic-ai from 1.107.7 to 2.57.0 - #207

Open
dependabot[bot] wants to merge 3 commits into
mainfrom
dependabot/uv/pydantic-ai-2.51.0
Open

dependabot[bot] wants to merge 3 commits into
mainfrom
dependabot/uv/pydantic-ai-2.51.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Bumps pydantic-ai from 1.107.7 to 2.57.0.

Release notes

Sourced from pydantic-ai's releases.

v2.57.0 (2026-10-15)

What's Changed

⚠️ Compatibility Notes

🚀 Features

🐛 Bug Fixes

New Contributors

Full Changelog: pydantic/pydantic-ai@v2.56.0...v2.57.0

v2.56.0 (2026-10-13)

... (truncated)

Changelog

Sourced from pydantic-ai's changelog.


description: "Pydantic AI upgrade guide and changelog: the breaking changes in each release, how to install V2, and the recommended path to migrate your code from V1."

Upgrade Guide

In September 2025, Pydantic AI reached V1 and committed to API stability: no changes that break your code until V2. V2 is now available, collecting the breaking and behavior changes that stability guarantee didn't allow. This guide is the canonical place to learn what's in V2, how to install it, and how to upgrade; for the guarantees behind these version numbers, see the Version Policy.

Deprecations

Functionality deprecated in a V2 release keeps working until V3, and using it raises a PydanticAIDeprecationWarning naming its replacement. Resolving these as they appear is the smooth path to the next major, the same way resolving V1's warnings was the smooth path to this one.

Deprecated in V2, to be removed in V3

  • [RetryPromptPart][pydantic_ai.messages.RetryPromptPart] is deprecated in favor of the two parts it conflated: a retry that answers a tool call is that call's own [ToolReturnPart][pydantic_ai.messages.ToolReturnPart] with outcome='retried', and one that answers no tool call is a [RetryFeedbackPart][pydantic_ai.messages.RetryFeedbackPart]. The old part reached the model as bare user text in the second case, which the model couldn't tell from something a person wrote (#6404, #7799). Pydantic AI no longer emits it, and constructing one warns.
    • What keeps working: a 'retry-prompt' part in a serialized history loads as whichever of the two it always meant, and an instance your own code holds, including one handed back through [DeferredToolResults][pydantic_ai.tools.DeferredToolResults], is translated the same way before it reaches a model. The direct helpers send it in that new shape too. Calling [Model.request()][pydantic_ai.models.Model.request] or [Model.count_tokens()][pydantic_ai.models.Model.count_tokens] yourself skips that translation but still works: a tool-bound one goes out as that call's retried result, and a tool-less one as the user text it always rendered as. [sanitize_messages][pydantic_ai.messages.sanitize_messages] keeps client-returned retry feedback: it translates a tool-less one into the RetryFeedbackPart it always meant, keeps a 'validation_error' or 'model_retry' part as sent (it reaches the model fenced, in the user voice), and demotes a 'no_output' part, the one cause rendered in the system voice, to that same fenced, attributed user text, since a client can forge it; pass strip_system_prompts=False to keep a 'no_output' part as sent.
    • What you need to change: isinstance(part, RetryPromptPart) no longer matches, so match the two parts above instead. Each records why the retry happened, and which attempt it is against which limit, in a [RetryInfo][pydantic_ai.messages.RetryInfo] on its retry field, which tool spans also carry as pydantic_ai.tool.retry.* attributes. [ToolRetryError.tool_retry][pydantic_ai.exceptions.ToolRetryError] holds one of those two parts, so read tool_name off it only after checking for a ToolReturnPart.
    • What the model now sees: a tool retry carries the serialized validation errors or the ModelRetry message, with no N validation errors: header and no Fix the errors and try again. suffix. One that answers no call arrives in the voice its cause calls for: validation errors and a ModelRetry message in the user voice, inside a <validation_errors> or <retry_feedback> fence behind one line saying the application, not the user, is speaking, and the framework's fixed request for usable output in the system voice. On providers without a native tool error channel, a retried tool call's validation errors go in the {"error": ...} wrapper as a JSON array rather than as a string holding one, and Anthropic and Bedrock get them as one text block. Client-returned retry feedback is kept by [sanitize_messages][pydantic_ai.messages.sanitize_messages] and the UI adapters rather than stripped, and a 'no_output' part among it goes out as fenced user text rather than in the system voice. Retries in a history stored before upgrading are rendered the new way too, since rendering happens when each request goes out, so a conversation's first request after upgrading misses the provider's prompt cache from its first retry onward, once. A [decision model][pydantic_ai.models.decision.DecisionModel] judges a retried tool call as that call's tool_return, where it had a retry entry. On ag-ui-protocol below 0.1.11, [AGUIAdapter.dump_messages][pydantic_ai.ui.ag_ui.AGUIAdapter.dump_messages] now also warns on a run that retried its own output. See Retries.
    • Vercel AI dumps keep a request's part order: [VercelAIAdapter.dump_messages][pydantic_ai.ui.vercel_ai.VercelAIAdapter.dump_messages] now writes a ModelRequest as one UIMessage per run of same-role parts, in the order they were authored, instead of putting every system part first. This applies with no retries at all: a request holding an enqueued SystemPromptPart after its UserPromptPart now dumps as a user message followed by a system message, and positional message ids shift with it. The request's metadata rides on its last user message, or its last message when it has none.

Breaking Changes

Here's a filtered list of the breaking changes for each version to help you upgrade Pydantic AI.

v2.0.0 (2026-06-23)

The stable V2.0 release. There are no new breaking or behavior changes since the betas; the full breaking-change list and recommended upgrade path are in the v2.0.0b1 entry below. Install it with:

uv add pydantic-ai

v2.0.0b7 (2026-06-10)

The seventh V2 beta, forked from v1.107.0. There are no new V2 breaking or behavior changes since v2.0.0b6 below — everything in that entry applies unchanged — but this beta picks up the latest V1 release on top, which adds Claude Fable 5 / Mythos 5 model support and OpenRouter prompt caching (CachePoint), plus known_model_names() and Anthropic fixes; see the v1.107.0 release notes for the full list.

Install it the same way, pinning the exact pre-release version:

pip/uv-add "pydantic-ai==2.0.0b7"

For the full breaking-change list and the recommended upgrade path, see the v2.0.0b1 entry below; the only difference is that the latest V1 to upgrade through first is now v1.107.0.

v2.0.0b6 (2026-06-04)

The sixth V2 beta, forked from v1.106.0. There are no new V2 breaking or behavior changes since v2.0.0b5 below — everything in that entry applies unchanged — but this beta picks up the latest V1 release on top, which adds api_host/timeout configuration and base seed mapping for the xAI provider, plus streaming and data-URI handling fixes; see the v1.106.0 release notes for the full list.

Install it the same way, pinning the exact pre-release version:

... (truncated)

Commits
  • 54a31ab Make /theme work in the clai2 web UI (#10277)
  • c318927 Add code mode and speculation toggles to the clai2 web UI, with a read-only...
  • 1f034ef Remove pre-release Agent.connect() and Responses WebSocket APIs (#10370)
  • 27b41ca Stream token counts in the clai2 web UI while a turn runs (#10275)
  • 253240f Show the Pydantic logo in the clai2 web UI (#10274)
  • 3650d9e Use Pydantic brand colours in the clai2 web UI, in dark and light mode (#10...
  • 9fd6f67 Group tool calls and center the new-session composer in the clai2 web UI (#...
  • d16c4a6 Add the clai2 web UI: a sessions sidebar, streaming chat, tool cards, and a...
  • b210940 Add an opt-in web plugin to clai2 that serves the session to a browser, w...
  • 2c3303c Let clai2 plugins drive the prompt with PluginHost.send_input, `interrupt...
  • Additional commits viewable in compare view

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot @github

dependabot Bot commented on behalf of github Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

Labels

The following labels could not be found: python. Please create it before Dependabot can add it to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

@dependabot dependabot Bot changed the title chore(deps): bump pydantic-ai from 1.83.0 to 2.51.0 chore(deps): bump pydantic-ai from 1.83.0 to 2.54.0 Oct 6, 2026
Copilot AI balanced review requested due to automatic review settings October 6, 2026 12:26
@dependabot
dependabot Bot force-pushed the dependabot/uv/pydantic-ai-2.51.0 branch from 0e82745 to 7309727 Compare October 6, 2026 12:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

@dependabot dependabot Bot changed the title chore(deps): bump pydantic-ai from 1.83.0 to 2.54.0 chore(deps): bump pydantic-ai from 1.107.7 to 2.57.0 Oct 22, 2026
@dependabot
dependabot Bot force-pushed the dependabot/uv/pydantic-ai-2.51.0 branch from 7309727 to 28b8909 Compare October 22, 2026 10:13
@glebedel
glebedel force-pushed the dependabot/uv/pydantic-ai-2.51.0 branch from 28b8909 to 2ca39cb Compare October 22, 2026 10:17

@s2d2-agent s2d2-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s2d2 dependabot evidence (run sa-2026-10-29-7e1f25f1)

Decision: SAFE. dev-only major, CI green.
Packages: pydantic-ai 1.107.7 to 2.57.0
Scope: dev only, major bump, tier 1.
CI: 12 checks, 0 failing, 0 pending at classification.
Not a security update.
Local verification not required for this class of bump.

Awaiting merge approval from Guillaume in the Security Autopilot thread. This is an evidence note, not an approval.

@glebedel

glebedel commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

s2d2 verdict: SAFE (local verification required before merge). lock-only major, CI green, pydantic_ai APIs used pass tests on 2.57.

  • CI on c624f1d: green
  • Breaking changes reaching our code: pydantic-ai 2.0: RetryPromptPart deprecated, retry prompts reworded for the model, other V2 behaviour changes; none touch Tool.from_schema or ModelRetry
  • Call sites: pydantic_ai imported lazily in stackone_ai/tools.py:1339-1340 (Tool, ModelRetry); tests/test_integrations_pydantic_ai.py, tests/test_fetch_tools.py; examples/pydantic_ai_integration.py

PR only changes uv.lock (pydantic-ai and pydantic-ai-slim 1.107.7 to 2.57.0, openai to 3.40.0 as a side effect). ci (3.11/3.12/3.13), conformance, ci-ok, gitleaks all pass on head c624f1d, so the test suite incl. the pydantic-ai integration tests ran against 2.57.0. pyproject extras are unbounded (>=1.83.0) so consumers can already install 2.x. Major in a tier 1 repo, so local verification still required.

Requested by guillaume@stackone.com, Security Autopilot run sa-2026-11-05-ae4daeb6. s2d2 never approves PRs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants