You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
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)
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:
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:
Check whether output_retries= was removed or merely deprecated (with a warning) in v1.98.0.
If removed: migrate to retries=STRUCTURED_OUTPUT_RETRIES (confirming the semantics are equivalent for the structured-output use case).
Update test assertions and the llm.py constant docstring to reflect the new parameter name.
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.
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.
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
dependenciesPull requests that update a dependency filepythonPull requests that update Python code
0 participants
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.
Updates the requirements on pydantic-ai-slim to permit the latest version.
Release notes
Sourced from pydantic-ai-slim's releases.
Changelog
Sourced from pydantic-ai-slim's changelog.
... (truncated)
Commits
2f461ecAdd OpenAI Responses input token counting (#3951)f458346fix(mcp): Don't requirefastmcp.serverat runtime (#5514)24c8cdcReplaceAgenttool_retries=/output_retries=with `retries: int | AgentR...8cc76d8Deprecatepydantic_ai.ext.aci(tool_from_aciandACIToolset) ahead of v...206453aDeprecateAgent.to_a2a()andfasta2aoptional dependency group; point use...e60a9aav2 prep: rewritedocs/graph.mdto use the builder API (#5465)33ef15dDeprecatestream_responses()forstream_response(); new singular yields `...c68c12fMovepydantic_graph.betaAPI out of beta, deprecate old API (#5306)e6bc869AddMCPToolsetthat usesfastmcp-slim[client], deprecateMCPServer*and...890c07cSetModelResponse.statetoincompletewhile response is still streaming (...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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)