2929 UiPathEvalRuntime ,
3030)
3131from uipath ._events ._event_bus import EventBus
32+ from uipath .tracing import LlmOpsHttpExporter
33+
34+
35+ @pytest .fixture
36+ def live_tracking_exporter ():
37+ """Create a live tracking exporter for tests."""
38+ return LlmOpsHttpExporter ()
3239
3340
3441class MockRuntimeSchema (UiPathRuntimeSchema ):
@@ -164,7 +171,9 @@ async def create_runtime():
164171 return BaseTestRuntime ()
165172
166173 factory = MockFactory (create_runtime )
167- return UiPathEvalRuntime (context , factory , trace_manager , event_bus )
174+ return UiPathEvalRuntime (
175+ context , factory , trace_manager , event_bus , LlmOpsHttpExporter ()
176+ )
168177
169178 def test_finds_model_in_direct_runtime (self , eval_runtime ):
170179 """Test finding agent model directly on runtime."""
@@ -228,7 +237,9 @@ async def create_runtime():
228237 factory = MockFactory (create_runtime )
229238 event_bus = EventBus ()
230239 trace_manager = UiPathTraceManager ()
231- eval_runtime = UiPathEvalRuntime (context , factory , trace_manager , event_bus )
240+ eval_runtime = UiPathEvalRuntime (
241+ context , factory , trace_manager , event_bus , LlmOpsHttpExporter ()
242+ )
232243
233244 runtime = await create_runtime ()
234245 model = await eval_runtime ._get_agent_model (runtime )
@@ -243,7 +254,9 @@ async def create_runtime():
243254 factory = MockFactory (create_runtime )
244255 event_bus = EventBus ()
245256 trace_manager = UiPathTraceManager ()
246- eval_runtime = UiPathEvalRuntime (context , factory , trace_manager , event_bus )
257+ eval_runtime = UiPathEvalRuntime (
258+ context , factory , trace_manager , event_bus , LlmOpsHttpExporter ()
259+ )
247260
248261 runtime = await create_runtime ()
249262 model = await eval_runtime ._get_agent_model (runtime )
@@ -258,7 +271,9 @@ async def create_runtime():
258271 factory = MockFactory (create_runtime )
259272 event_bus = EventBus ()
260273 trace_manager = UiPathTraceManager ()
261- eval_runtime = UiPathEvalRuntime (context , factory , trace_manager , event_bus )
274+ eval_runtime = UiPathEvalRuntime (
275+ context , factory , trace_manager , event_bus , LlmOpsHttpExporter ()
276+ )
262277
263278 runtime = await create_runtime ()
264279
@@ -277,7 +292,9 @@ async def create_good_runtime():
277292 factory = MockFactory (create_good_runtime )
278293 event_bus = EventBus ()
279294 trace_manager = UiPathTraceManager ()
280- eval_runtime = UiPathEvalRuntime (context , factory , trace_manager , event_bus )
295+ eval_runtime = UiPathEvalRuntime (
296+ context , factory , trace_manager , event_bus , LlmOpsHttpExporter ()
297+ )
281298
282299 # Create a bad runtime that raises during get_agent_model
283300 class BadRuntime (BaseTestRuntime ):
@@ -310,7 +327,9 @@ async def create_runtime():
310327 factory = MockFactory (create_runtime )
311328 event_bus = EventBus ()
312329 trace_manager = UiPathTraceManager ()
313- eval_runtime = UiPathEvalRuntime (context , factory , trace_manager , event_bus )
330+ eval_runtime = UiPathEvalRuntime (
331+ context , factory , trace_manager , event_bus , LlmOpsHttpExporter ()
332+ )
314333
315334 runtime = await create_runtime ()
316335 schema = await eval_runtime .get_schema (runtime )
@@ -326,7 +345,9 @@ async def create_runtime():
326345 factory = MockFactory (create_runtime )
327346 event_bus = EventBus ()
328347 trace_manager = UiPathTraceManager ()
329- eval_runtime = UiPathEvalRuntime (context , factory , trace_manager , event_bus )
348+ eval_runtime = UiPathEvalRuntime (
349+ context , factory , trace_manager , event_bus , LlmOpsHttpExporter ()
350+ )
330351
331352 runtime = await create_runtime ()
332353
@@ -346,7 +367,9 @@ async def create_runtime():
346367 factory = MockFactory (create_runtime )
347368 event_bus = EventBus ()
348369 trace_manager = UiPathTraceManager ()
349- eval_runtime = UiPathEvalRuntime (context , factory , trace_manager , event_bus )
370+ eval_runtime = UiPathEvalRuntime (
371+ context , factory , trace_manager , event_bus , LlmOpsHttpExporter ()
372+ )
350373
351374 runtime = await create_runtime ()
352375
@@ -393,7 +416,9 @@ async def create_runtime():
393416 factory = MockFactory (create_runtime )
394417 event_bus = EventBus ()
395418 trace_manager = UiPathTraceManager ()
396- eval_runtime = UiPathEvalRuntime (context , factory , trace_manager , event_bus )
419+ eval_runtime = UiPathEvalRuntime (
420+ context , factory , trace_manager , event_bus , LlmOpsHttpExporter ()
421+ )
397422
398423 model = await eval_runtime ._get_agent_model (resumable_runtime )
399424 assert model == "gpt-4o-from-agent-json"
0 commit comments