Skip to content

Crash when patching pydantic-ai==1.63.0 #5567

Closed as not planned
Closed as not planned

Description

@anze3db

How do you use Sentry?

Sentry Saas (sentry.io)

Version

2.53.0

Steps to Reproduce

  1. Install pydantic-ai==1.63.0
  2. Run setup_integrations

Expected Result

No, error. Same behavior as prior versions.

Actual Result

pydantic_ai patcher crashes with:

  File "/Users/anzepecar/job/app/config/settings.py", line 1477, in <module>
    sentry_sdk.init(
    ~~~~~~~~~~~~~~~^
        dsn=SENTRY_DSN,
        ^^^^^^^^^^^^^^^
    ...<13 lines>...
        release=GIT_SHA,
        ^^^^^^^^^^^^^^^^
    )
    ^
  File "/Users/anzepecar/job/app/.venv/lib/python3.13/site-packages/sentry_sdk/_init_implementation.py", line 57, in _init
    client = sentry_sdk.Client(*args, **kwargs)
  File "/Users/anzepecar/job/app/.venv/lib/python3.13/site-packages/sentry_sdk/client.py", line 285, in __init__
    self._init_impl()
    ~~~~~~~~~~~~~~~^^
  File "/Users/anzepecar/job/app/.venv/lib/python3.13/site-packages/sentry_sdk/client.py", line 437, in _init_impl
    self.integrations = setup_integrations(
                        ~~~~~~~~~~~~~~~~~~^
        self.options["integrations"],
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
        options=self.options,
        ^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/Users/anzepecar/job/app/.venv/lib/python3.13/site-packages/sentry_sdk/integrations/__init__.py", line 258, in setup_integrations
    type(integration).setup_once()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/Users/anzepecar/job/app/.venv/lib/python3.13/site-packages/sentry_sdk/integrations/pydantic_ai/__init__.py", line 50, in setup_once
    _patch_tool_execution()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/Users/anzepecar/job/app/.venv/lib/python3.13/site-packages/sentry_sdk/integrations/pydantic_ai/patches/tools.py", line 43, in _patch_tool_execution
    original_call_tool = ToolManager._call_tool
                         ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'ToolManager' has no attribute '_call_tool'

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Mar 2, 2026
  2. linear commented on Mar 2, 2026

    @linear
  3. sentrivana commented on Mar 2, 2026

    @sentrivana
    Collaborator

    Hey, thanks for reporting, this is already fixed on main and there will be a release later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions