@@ -191,7 +191,7 @@ def test_start_model_invoke_span_latest_conventions(mock_tracer):
191
191
[
192
192
{
193
193
"role" : messages [0 ]["role" ],
194
- "parts" : [{"type" : "text" , "content" : serialize ( messages [0 ]["content" ]) }],
194
+ "parts" : [{"type" : "text" , "content" : messages [0 ]["content" ]}],
195
195
}
196
196
]
197
197
)
@@ -249,7 +249,7 @@ def test_end_model_invoke_span_latest_conventions(mock_span):
249
249
[
250
250
{
251
251
"role" : "assistant" ,
252
- "parts" : [{"type" : "text" , "content" : serialize ( message ["content" ]) }],
252
+ "parts" : [{"type" : "text" , "content" : message ["content" ]}],
253
253
"finish_reason" : "end_turn" ,
254
254
}
255
255
]
@@ -318,7 +318,7 @@ def test_start_tool_call_span_latest_conventions(mock_tracer):
318
318
"type" : "tool_call" ,
319
319
"name" : tool ["name" ],
320
320
"id" : tool ["toolUseId" ],
321
- "arguments" : [{"content" : serialize ( tool ["input" ]) }],
321
+ "arguments" : [{"content" : tool ["input" ]}],
322
322
}
323
323
],
324
324
}
@@ -398,7 +398,7 @@ def test_start_swarm_span_with_contentblock_task_latest_conventions(mock_tracer)
398
398
"gen_ai.client.inference.operation.details" ,
399
399
attributes = {
400
400
"gen_ai.input.messages" : serialize (
401
- [{"role" : "user" , "parts" : [{"type" : "text" , "content" : ' [{"text": "Original Task: foo bar"}]' }]}]
401
+ [{"role" : "user" , "parts" : [{"type" : "text" , "content" : [{"text" : "Original Task: foo bar" }]}]}]
402
402
)
403
403
},
404
404
)
@@ -502,7 +502,7 @@ def test_end_tool_call_span_latest_conventions(mock_span):
502
502
{
503
503
"type" : "tool_call_response" ,
504
504
"id" : tool_result .get ("toolUseId" , "" ),
505
- "result" : serialize ( tool_result .get ("content" ) ),
505
+ "result" : tool_result .get ("content" ),
506
506
}
507
507
],
508
508
}
@@ -559,7 +559,7 @@ def test_start_event_loop_cycle_span_latest_conventions(mock_tracer):
559
559
"gen_ai.client.inference.operation.details" ,
560
560
attributes = {
561
561
"gen_ai.input.messages" : serialize (
562
- [{"role" : "user" , "parts" : [{"type" : "text" , "content" : serialize ( messages [0 ]["content" ]) }]}]
562
+ [{"role" : "user" , "parts" : [{"type" : "text" , "content" : messages [0 ]["content" ]}]}]
563
563
)
564
564
},
565
565
)
@@ -601,7 +601,7 @@ def test_end_event_loop_cycle_span_latest_conventions(mock_span):
601
601
[
602
602
{
603
603
"role" : "assistant" ,
604
- "parts" : [{"type" : "text" , "content" : serialize ( tool_result_message ["content" ]) }],
604
+ "parts" : [{"type" : "text" , "content" : tool_result_message ["content" ]}],
605
605
}
606
606
]
607
607
)
@@ -676,7 +676,7 @@ def test_start_agent_span_latest_conventions(mock_tracer):
676
676
"gen_ai.client.inference.operation.details" ,
677
677
attributes = {
678
678
"gen_ai.input.messages" : serialize (
679
- [{"role" : "user" , "parts" : [{"type" : "text" , "content" : ' [{"text": "test prompt"}]' }]}]
679
+ [{"role" : "user" , "parts" : [{"type" : "text" , "content" : [{"text" : "test prompt" }]}]}]
680
680
)
681
681
},
682
682
)
0 commit comments