@@ -106,23 +106,23 @@ async def handle_call(
106106 """
107107 if self .tools is None or self .ctx is None :
108108 raise ValueError ('ToolManager has not been prepared for a run step yet' ) # pragma: no cover
109-
109+
110110 if (tool := self .tools .get (call .tool_name )) and tool .tool_def .kind == 'output' :
111111 output_tool_flag = True
112112 else :
113113 output_tool_flag = False
114114
115115 return await self ._call_function_tool (
116- call ,
117- allow_partial = allow_partial ,
118- wrap_validation_errors = wrap_validation_errors ,
119- approved = approved ,
120- tracer = self .ctx .tracer ,
121- include_content = self .ctx .trace_include_content ,
122- instrumentation_version = self .ctx .instrumentation_version ,
123- usage = self .ctx .usage ,
124- output_tool_flag = output_tool_flag ,
125- )
116+ call ,
117+ allow_partial = allow_partial ,
118+ wrap_validation_errors = wrap_validation_errors ,
119+ approved = approved ,
120+ tracer = self .ctx .tracer ,
121+ include_content = self .ctx .trace_include_content ,
122+ instrumentation_version = self .ctx .instrumentation_version ,
123+ usage = self .ctx .usage ,
124+ output_tool_flag = output_tool_flag ,
125+ )
126126
127127 async def _call_tool (
128128 self ,
@@ -220,8 +220,6 @@ async def _call_function_tool(
220220 else :
221221 tool_name = call .tool_name
222222
223-
224-
225223 span_attributes = {
226224 'gen_ai.tool.name' : tool_name ,
227225 # NOTE: this means `gen_ai.tool.call.id` will be included even if it was generated by pydantic-ai
0 commit comments