@@ -139,29 +139,6 @@ async def wrapper(self, *args, **kwargs):
139139 return wrapper
140140
141141
142- def _create_run_sync_wrapper (original_func ):
143- # type: (Callable[..., Any]) -> Callable[..., Any]
144- """
145- Wraps the Agent.run_sync method - no span needed as it delegates to run().
146-
147- Note: run_sync just calls self.run() via run_until_complete, so the
148- invoke_agent span will be created by the run() wrapper.
149- """
150-
151- @wraps (original_func )
152- def wrapper (self , * args , ** kwargs ):
153- # type: (Any, *Any, **Any) -> Any
154- # Just call the original function - it will call run() which has the instrumentation
155- try :
156- result = original_func (self , * args , ** kwargs )
157- return result
158- except Exception as exc :
159- _capture_exception (exc )
160- raise exc from None
161-
162- return wrapper
163-
164-
165142def _create_streaming_wrapper (original_func ):
166143 # type: (Callable[..., Any]) -> Callable[..., Any]
167144 """
@@ -226,13 +203,11 @@ def _patch_agent_run():
226203
227204 # Store original methods
228205 original_run = Agent .run
229- original_run_sync = Agent .run_sync
230206 original_run_stream = Agent .run_stream
231207 original_run_stream_events = Agent .run_stream_events
232208
233209 # Wrap and apply patches for non-streaming methods
234210 Agent .run = _create_run_wrapper (original_run , is_streaming = False ) # type: ignore
235- Agent .run_sync = _create_run_sync_wrapper (original_run_sync ) # type: ignore
236211
237212 # Wrap and apply patches for streaming methods
238213 Agent .run_stream = _create_streaming_wrapper (original_run_stream ) # type: ignore
0 commit comments