Skip to content

chore(deps): bump pydantic-ai-slim from 2.31.0 to 2.53.0 in /dify-agent - #43724

Closed
dependabot[bot] wants to merge 5 commits into
mainfrom
dependabot/uv/dify-agent/pydantic-ai-slim-2.53.0
Closed

dependabot[bot] wants to merge 5 commits into
mainfrom
dependabot/uv/dify-agent/pydantic-ai-slim-2.53.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Compatibility Follow-Up

Refs #44777 (pydantic-ai-slim and Agent Pillow declaration consistency).

This PR now completes the 2.53.0 upgrade rather than changing only the Agent lockfile:

  • Update both exact Agent pins (base and server extras) and regenerate the Agent and API locks. The API consumes Agent as a local path dependency.
  • Remove the unused DifyApiLLMProvider._set_http_client override. This provider borrows a lifespan-owned HTTP client, whereas the upstream hook is for recreating provider-owned clients; the old override also no longer matches the upstream HTTPX/HTTPX2 union signature.
  • Make stream-event JSON Schema usable by FastAPI/OpenAPI. Upstream custom/capability event families produce inline oneOf objects in discriminator.mapping, where OpenAPI requires strings. Remove only the field's generated documentation discriminator, retaining oneOf and native runtime validation. Tests cover real FastAPI OpenAPI generation, unknown event payload round-trips, and rejection of invalid event kinds.
  • Preserve the existing interrupted-history fallback. In 2.53.0, cancellation during tool execution records a native interrupted ModelRequest. Cancellation after the model response but before tool-stream processing can still leave a complete tool-call response. A real Agent.run regression test verifies untreated history rejects a fresh prompt and the fallback permits continuation without executing the abandoned tool. Update the existing cancellation/continuation test and documentation to reflect both paths; history production logic is unchanged.
  • Widen Agent's Pillow declaration from <13 to <14 to match the already-merged/locked Pillow 13.0.0 and avoid downgrading it during resolution. Pillow remains 13.0.0 and Agent pypdf remains 6.21.2; this is not a new package upgrade.

Validation

Reproduced the original three test failures and one type-check error on the PR, with the same selected cases passing on main/2.31.0 before the fixes.

After the fixes, on Python 3.13:

  • Full Agent suite, including docs/examples: 1047 passed, 5 skipped.
  • ruff check .: passed.
  • pyrefly check: 0 errors.
  • Agent uv sync --extra server --python 3.13 with uv 0.13.5: passed (non-frozen resolution; declarations and lock agree).
  • uv lock --check for both Agent and API: passed.
  • The API's full installation and full backend test suite were not run.

The API lock's revision/default-group metadata and httpcore2 marker normalization come from regenerating it with uv 0.13.5; its pinned Git refs remain unchanged.

Upstream References


Bumps pydantic-ai-slim from 2.31.0 to 2.53.0.

Release notes

Sourced from pydantic-ai-slim's releases.

v2.53.0 (2026-10-01)

🛡️ Security

This release fixes one security issue in ConcurrencyLimitedModel. See the advisory for full details and affected versions.

  • GHSA-6fqq-452j-qhrp (high): a streamed request through ConcurrencyLimitedModel or limit_model_concurrency could keep its concurrency slot when the slot was released on a different task than the one that acquired it: after an early exit (the consumer stopped iterating, raised, or was cancelled), and also after fully consuming stream_text() with its default debouncing. Repeated streams could then block every request sharing the limiter. Agent-level max_concurrency and non-streaming requests are not affected. Reported by @​lche511. (#9478)

The fix also changes how limiters are shared: a model wrapper now raises UserError when it shares a limiter with the agent making the request or with an enclosing model wrapper, ConcurrencyLimiter.acquire() takes a slot on every call, even on the same task, and a custom AbstractConcurrencyLimiter must allow release() from another task.

Patched in 2.53.0. v1 is not affected.

What's Changed

⚠️ Compatibility Notes

🚀 Features

🐛 Bug Fixes

... (truncated)

Commits
  • b38ab5d Document that InlineDefsJsonSchemaTransformer only walks object and array k...
  • c50e223 Keep the test suite passing on anthropic 1.11.0, dbos 3.2.0 and `google-g...
  • 453f19f Fix RuntimeError and a leaked slot when streaming through `ConcurrencyLimit...
  • d63315d Let GoogleRealtimeModel declare tools whose dict values are recursive mod...
  • ce6b675 Allow unschemable types in the derived Temporal ActivityConfig schema (#9577)
  • f596e4b Keep the launch-directory workspace in clai2 when capability functions supp...
  • 5b5a414 Fix the TOML disk sub-agent test that still expected the removed effort floor...
  • 1013241 Make Logfire Temporal spans replay-safe (#7006)
  • 9da37d4 Expose the message-history repair pipeline as repair_messages (#8370)
  • aba3e75 Say native tools aren't routed to OpenAI realtime yet, rather than unsupporte...
  • Additional commits viewable in compare view

From Devin

@dependabot
dependabot Bot requested a review from a team October 9, 2026 03:16
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Oct 9, 2026
@dependabot
dependabot Bot requested a review from BeautyyuYanli as a code owner October 9, 2026 03:16
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Oct 9, 2026
@ghfind-review ghfind-review Bot added the review: no-score ghfind author score missing (not zero) label Oct 9, 2026
@github-actions github-actions Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Oct 9, 2026
Bumps [pydantic-ai-slim](https://github.com/pydantic/pydantic-ai) from 2.31.0 to 2.53.0.
- [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@v2.31.0...v2.53.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/uv/dify-agent/pydantic-ai-slim-2.53.0 branch from ef8746b to 48d56d5 Compare October 9, 2026 10:55
zhangx1n
zhangx1n previously approved these changes Oct 15, 2026
@zhangx1n

Copy link
Copy Markdown
Contributor

CI is red.

wylswz
wylswz previously approved these changes Oct 26, 2026
@wylswz
wylswz self-requested a review October 26, 2026 04:53
@wylswz wylswz self-assigned this Oct 26, 2026
Align both Agent dependency pins and the API path-dependency lock, preserve the already-locked Pillow 13 release, fix borrowed-client lifecycle typing and stream-event OpenAPI generation, and cover interrupted-history continuation boundaries.

Refs #44777
@wylswz
wylswz dismissed stale reviews from zhangx1n and themself via f38286f October 26, 2026 08:44
@wylswz
wylswz requested a review from QuantumGhost as a code owner October 26, 2026 08:44
@github-actions github-actions Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Oct 26, 2026
zhaohao1004
zhaohao1004 previously approved these changes Oct 26, 2026
@wylswz
wylswz enabled auto-merge October 27, 2026 09:47
@wylswz

wylswz commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

The dependency has been upgraded in #45041

@wylswz wylswz closed this Nov 2, 2026
auto-merge was automatically disabled November 2, 2026 07:45

Pull request was closed

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:uv Pull requests that update python:uv code review: no-score ghfind author score missing (not zero) size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants