Skip to content

Commit d0cb35b

Browse files
.
1 parent b5b4d63 commit d0cb35b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

sentry_sdk/integrations/pydantic_ai/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def setup_once() -> None:
5757
- Tool executions
5858
"""
5959
_patch_agent_run()
60+
_patch_tool_execution()
6061

6162
try:
6263
from pydantic_ai.capabilities import Hooks # type: ignore
@@ -69,11 +70,9 @@ def setup_once() -> None:
6970
_patch_model_request()
7071
return
7172

72-
_patch_tool_execution()
73-
7473
# Assumptions:
7574
# - Model requests within a run are sequential.
76-
# - ctx.metadata is a shared dict instance between hooks.
75+
# - ctx.metadata is a shared dictionary instance between hooks.
7776
hooks = Hooks()
7877

7978
@hooks.on.before_model_request # type: ignore

0 commit comments

Comments
 (0)