Skip to content

Chore(deps): update pydantic-ai-slim requirement from <2,>=1.96.1 to >=1.98.0,<2#1707

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/pydantic-ai-slim-gte-1.98.0-and-lt-2
Closed

Chore(deps): update pydantic-ai-slim requirement from <2,>=1.96.1 to >=1.98.0,<2#1707
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/pydantic-ai-slim-gte-1.98.0-and-lt-2

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github May 19, 2026

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

Release notes

Sourced from pydantic-ai-slim's releases.

v1.98.0 (2026-05-18)

What's Changed

🚀 Features

🐛 Bug Fixes

🆕 V2 Preparation

New Contributors

Full Changelog: pydantic/pydantic-ai@v1.97.0...v1.98.0

Changelog

Sourced from pydantic-ai-slim's changelog.

Upgrade Guide

In September 2025, Pydantic AI reached V1, which means we're committed to API stability: we will not introduce changes that break your code until V2. For more information, review our Version Policy.

Breaking Changes

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

v1.0.1 (2025-09-05)

The following breaking change was accidentally left out of v1.0.0:

  • See #2808 - Remove Python evaluator from pydantic_evals for security reasons

v1.0.0 (2025-09-04)

  • See #2725 - Drop support for Python 3.9
  • See #2738 - Make many dataclasses require keyword arguments
  • See #2715 - Remove cases and averages attributes from pydantic_evals spans
  • See #2798 - Change ModelRequest.parts and ModelResponse.parts types from list to Sequence
  • See #2726 - Default InstrumentationSettings version to 2
  • See #2717 - Remove errors when passing AsyncRetrying or Retrying object to AsyncTenacityTransport or TenacityTransport instead of RetryConfig

v0.x.x

Before V1, minor versions were used to introduce breaking changes:

v0.8.0 (2025-08-26)

See #2689 - AgentStreamEvent was expanded to be a union of ModelResponseStreamEvent and HandleResponseEvent, simplifying the event_stream_handler function signature. Existing code accepting AgentStreamEvent | HandleResponseEvent will continue to work.

v0.7.6 (2025-08-26)

The following breaking change was inadvertently released in a patch version rather than a minor version:

See #2670 - TenacityTransport and AsyncTenacityTransport now require the use of pydantic_ai.retries.RetryConfig (which is just a TypedDict containing the kwargs to tenacity.retry) instead of tenacity.Retrying or tenacity.AsyncRetrying.

v0.7.0 (2025-08-12)

See #2458 - pydantic_ai.models.StreamedResponse now yields a FinalResultEvent along with the existing PartStartEvent and PartDeltaEvent. If you're using pydantic_ai.direct.model_request_stream or pydantic_ai.direct.model_request_stream_sync, you may need to update your code to account for this.

See #2458 - pydantic_ai.models.Model.request_stream now receives a run_context argument. If you've implemented a custom Model subclass, you will need to account for this.

See #2458 - pydantic_ai.models.StreamedResponse now requires a model_request_parameters field and constructor argument. If you've implemented a custom Model subclass and implemented request_stream, you will need to account for this.

v0.6.0 (2025-08-06)

This release was meant to clean some old deprecated code, so we can get a step closer to V1.

See #2440 - The next method was removed from the Graph class. Use async with graph.iter(...) as run: run.next() instead.

... (truncated)

Commits
  • 2f461ec Add OpenAI Responses input token counting (#3951)
  • f458346 fix(mcp): Don't require fastmcp.server at runtime (#5514)
  • 24c8cdc Replace Agent tool_retries=/output_retries= with `retries: int | AgentR...
  • 8cc76d8 Deprecate pydantic_ai.ext.aci (tool_from_aci and ACIToolset) ahead of v...
  • 206453a Deprecate Agent.to_a2a() and fasta2a optional dependency group; point use...
  • e60a9aa v2 prep: rewrite docs/graph.md to use the builder API (#5465)
  • 33ef15d Deprecate stream_responses() for stream_response(); new singular yields `...
  • c68c12f Move pydantic_graph.beta API out of beta, deprecate old API (#5306)
  • e6bc869 Add MCPToolset that uses fastmcp-slim[client], deprecate MCPServer* and...
  • 890c07c Set ModelResponse.state to incomplete while response is still streaming (...
  • Additional commits viewable in compare view

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.96.1...v1.98.0)

---
updated-dependencies:
- dependency-name: pydantic-ai-slim
  dependency-version: 1.98.0
  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 May 19, 2026
@claude
Copy link
Copy Markdown

claude Bot commented May 19, 2026

Code Review: Bump pydantic-ai-slim lower bound to >=1.98.0

Scope: Single-line change in requirements/base.txt, bumping the minimum version of pydantic-ai-slim from >=1.96.1 to >=1.98.0.


Critical Issue — Potential breaking change: output_retries= parameter

v1.98.0 ships a breaking API change: it replaces Agent's tool_retries= / output_retries= constructor parameters with a unified retries: int | AgentRetries parameter (upstream PR pydantic/pydantic-ai#5500).

The codebase currently passes output_retries=STRUCTURED_OUTPUT_RETRIES directly in two callsites:

opencontractserver/llms/agents/pydantic_ai_agents.py (~line 1723):

structured_agent = make_pydantic_ai_agent(
    ...
    output_retries=STRUCTURED_OUTPUT_RETRIES,   # <-- deprecated/removed in v1.98.0
)

make_pydantic_ai_agent forwards all **kwargs verbatim to PydanticAIAgent(...), so output_retries= reaches the constructor directly. If v1.98.0 removed the parameter, this will raise a TypeError at runtime on every structured extraction run, breaking the DataCell pipeline.

opencontractserver/tests/test_pydantic_ai_agents.py (~lines 1304, 1308, 1345, 1660):
Several test assertions check that output_retries is present in constructor kwargs. If the production code is migrated to the new retries= API, these tests must be updated — otherwise they will silently stop verifying the retry budget is actually applied.

opencontractserver/constants/llm.py (~line 13):
The docstring comment references `pydantic-ai's ``output_retries```. This will become stale and misleading if the migration proceeds.

Recommended action before merging:

  1. Check whether output_retries= was removed or merely deprecated (with a warning) in v1.98.0.
  2. If removed: migrate to retries=STRUCTURED_OUTPUT_RETRIES (confirming the semantics are equivalent for the structured-output use case).
  3. Update test assertions and the llm.py constant docstring to reflect the new parameter name.
  4. Run the test suite against v1.98.0 before merging.

Other v1.98.0 changes — no issues found

A search across the repository confirms the remaining v1.98.0 changes are safe:

  • No imports of pydantic_ai.ext.aci, tool_from_aci, or ACIToolset (deprecated in this release).
  • No usage of Agent.to_a2a() or fasta2a.
  • The MCP test file does not import pydantic-ai's MCPServer* toolset classes.
  • The fastmcp.server lazy-import fix and OpenAI token-counting update don't touch any APIs used here.

Positive observations

  • The requirement comment is excellent — it documents the mistralai PyPI 404 incident, why pydantic-ai-slim is used over the meta-package, and points to issue Wrap PydanticAIAgent construction to fail loud on system_prompt regression #1451 for upper-bound decisions.
  • The make_pydantic_ai_agent factory is a well-designed chokepoint: once the output_retries=retries= migration is done, there's only one line to change.
  • Keeping the upper bound at <2 is correct given pydantic-ai's active V2 preparation visible in this release.

Verdict

Do not merge as-is. Please verify whether output_retries= was removed or merely deprecated in v1.98.0, and if necessary migrate pydantic_ai_agents.py:~1723 plus the related test assertions before landing this bump. Merging without that check risks silently breaking structured extraction in production.

@dependabot @github
Copy link
Copy Markdown
Contributor Author

dependabot Bot commented on behalf of github May 20, 2026

Superseded by #1725.

@dependabot dependabot Bot closed this May 20, 2026
@dependabot dependabot Bot deleted the dependabot/pip/pydantic-ai-slim-gte-1.98.0-and-lt-2 branch May 20, 2026 21:17
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.

0 participants