Skip to content

Update pydantic-ai-slim requirement from <2,>=1.107.0 to >=1.107.1,<2#2155

Merged
JSv4 merged 1 commit into
mainfrom
dependabot/pip/pydantic-ai-slim-gte-1.107.1-and-lt-2
Jul 18, 2026
Merged

Update pydantic-ai-slim requirement from <2,>=1.107.0 to >=1.107.1,<2#2155
JSv4 merged 1 commit into
mainfrom
dependabot/pip/pydantic-ai-slim-gte-1.107.1-and-lt-2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 13, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on pydantic-ai-slim to permit the latest version.

Release notes

Sourced from pydantic-ai-slim's releases.

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_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.

  • Affected: pydantic-ai / pydantic-ai-slim >= 1.88.0, < 1.107.1 (v1) and >= 2.0.0, < 2.5.0 (v2)
  • Patched: 1.107.1 (v1) and 2.5.0 (v2)
  • Not affected if every sensitive tool uses 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

Full Changelog: pydantic/pydantic-ai@v1.107.0...v1.107.1

Changelog

Sourced from pydantic-ai-slim's changelog.

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.

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:

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

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.106.0.

v2.0.0b5 (2026-06-02)

The fifth V2 beta, forked from v1.105.0. There are no new V2 breaking or behavior changes since v2.0.0b4 below — everything in that entry (including the prepare-callbacks change) still applies — but this beta picks up the latest V1 release on top, which adds on-demand (deferred-loading) capabilities and Grok 4.3 reasoning_effort support, plus GoogleModelSettings.google_cached_content and Temporal gateway/ fixes; see the v1.105.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.0b5"

... (truncated)

Commits
  • 54d51db Fix sanitize_messages tail handling when a trailing client message is dropp...
  • See full diff in compare view

Most Recent Ignore Conditions Applied to This Pull Request
Dependency Name Ignore Conditions
pydantic-ai-slim [>= 2.dev0, < 3]

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [pydantic-ai-slim](https://github.com/pydantic/pydantic-ai) to permit the latest version.
- [Release notes](https://github.com/pydantic/pydantic-ai/releases)
- [Changelog](https://github.com/pydantic/pydantic-ai/blob/main/docs/changelog.md)
- [Commits](pydantic/pydantic-ai@v1.107.0...v1.107.1)

---
updated-dependencies:
- dependency-name: pydantic-ai-slim
  dependency-version: 1.107.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Jul 13, 2026
@claude

claude Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review

Minimal, well-scoped dependency bump — just the floor on pydantic-ai-slim in requirements/base.txt (>=1.107.0,<2>=1.107.1,<2). No other files need to change since this repo pins via a floor/ceiling range rather than a compiled lockfile.

Notes:

  • This is a genuine security patch release: 1.107.1 fixes GHSA-jpr8-2v3g-wgf9 (CWE-863), where UIAdapter.sanitize_messages on the AG-UI serving path (Agent.to_ag_ui() / AGUIAdapter) could re-expose a dangling tool call with client-chosen arguments after sanitization dropped a trailing client message. Worth confirming OpenContracts doesn't use Agent.to_ag_ui() / AGUIAdapter anywhere — a quick grep shows no matches in opencontractserver/llms/, so this codebase likely wasn't exploitable, but merging is still correct hygiene.
  • Comment on line 59 ("see issue Wrap PydanticAIAgent construction to fail loud on system_prompt regression #1451 before bumping the upper bound") is respected — only the lower bound moved, not <2.
  • Per this repo's CLAUDE.md pitfall Bump pytz from 2021.3 to 2022.5 #17, opencontractserver/llms/history_processors.py has a module-level assertion that ToolReturnPart/ModelRequest/ModelResponse remain stdlib @dataclasses, and will raise RuntimeError at Django/Celery startup if pydantic-ai changes that shape. This is a patch bump (1.107.0 → 1.107.1) with a scoped bugfix, so the shape almost certainly hasn't changed, but it's worth a quick python manage.py check / app boot after merge to be safe.

No code, tests, or behavior changes beyond the version constraint — LGTM.

@JSv4
JSv4 merged commit c8c0ac6 into main Jul 18, 2026
6 checks passed
@dependabot
dependabot Bot deleted the dependabot/pip/pydantic-ai-slim-gte-1.107.1-and-lt-2 branch July 18, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant