ref(pydantic_ai): migrate wrapper to integration patchers#182
Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit intomainfrom Mar 31, 2026
Merged
Conversation
813fce7 to
220e5b0
Compare
This comment was marked as outdated.
This comment was marked as outdated.
220e5b0 to
9ca63e8
Compare
Move the Pydantic AI wrapper implementation into the integrations package and keep the legacy wrapper module as a compatibility re-export. This aligns the provider with the newer integration architecture and consolidates its tests, auto-instrument wiring, and public exports in one place. Add generic class-scan support in the shared integration base so runtime-loaded subclasses can be rescanned and patched without leaking patch-marker details into tracing code. Use that helper for Pydantic AI model-class wrapping and move wrap_model_classes into patchers so patcher-specific behavior stays in the patching layer.
9ca63e8 to
3f6d01c
Compare
ViaDézo1er / cedric (viadezo1er)
approved these changes
Mar 31, 2026
Contributor
ViaDézo1er / cedric (viadezo1er)
left a comment
There was a problem hiding this comment.
stamp
This was referenced Mar 31, 2026
Closed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ref #116
Convert the Pydantic AI instrumentation from the legacy wrappers pattern to the new integrations API introduced in #118.
Move the Pydantic AI wrapper implementation into the integrations package and keep the legacy wrapper module as a compatibility re-export. This aligns the provider with the newer integration architecture and consolidates its tests, auto-instrument wiring, and public exports in one place.
Add generic class-scan support in the shared integration base so runtime-loaded subclasses can be rescanned and patched without leaking patch-marker details into tracing code. Use that helper for Pydantic AI model-class wrapping and move wrap_model_classes into patchers so patcher-specific behavior stays in the patching layer.
Fixes #168
supercedes #169