Skip to content

Commit 1f1cc44

Browse files
add docstring
1 parent 49dc6f4 commit 1f1cc44

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sentry_sdk/integrations/pydantic_ai/patches/graph_nodes.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ async def wrapped_model_request_run(self: "Any", ctx: "Any") -> "Any":
6363
with ai_client_span(None, model, model_settings) as span:
6464
result = await original_model_request_run(self, ctx)
6565

66+
# The instructions are added in `_prepare_request` that runs as part of `ModelRequestNode.run`, so the input
67+
# must be recorded after the call. See _get_instructions() added with
68+
# https://github.com/pydantic/pydantic-ai/commit/f5271434a56c7a3bb5a3c93f2d1236d8b18afe3e
6669
if messages:
6770
_set_input_messages(span, messages)
6871

0 commit comments

Comments
 (0)