@@ -191,7 +191,7 @@ def test_start_model_invoke_span_latest_conventions(mock_tracer):
191191 [
192192 {
193193 "role" : messages [0 ]["role" ],
194- "parts" : [{"type" : "text" , "content" : serialize ( messages [0 ]["content" ]) }],
194+ "parts" : [{"type" : "text" , "content" : messages [0 ]["content" ]}],
195195 }
196196 ]
197197 )
@@ -249,7 +249,7 @@ def test_end_model_invoke_span_latest_conventions(mock_span):
249249 [
250250 {
251251 "role" : "assistant" ,
252- "parts" : [{"type" : "text" , "content" : serialize ( message ["content" ]) }],
252+ "parts" : [{"type" : "text" , "content" : message ["content" ]}],
253253 "finish_reason" : "end_turn" ,
254254 }
255255 ]
@@ -318,7 +318,7 @@ def test_start_tool_call_span_latest_conventions(mock_tracer):
318318 "type" : "tool_call" ,
319319 "name" : tool ["name" ],
320320 "id" : tool ["toolUseId" ],
321- "arguments" : [{"content" : serialize ( tool ["input" ]) }],
321+ "arguments" : [{"content" : tool ["input" ]}],
322322 }
323323 ],
324324 }
@@ -398,7 +398,7 @@ def test_start_swarm_span_with_contentblock_task_latest_conventions(mock_tracer)
398398 "gen_ai.client.inference.operation.details" ,
399399 attributes = {
400400 "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" }]}]}]
402402 )
403403 },
404404 )
@@ -502,7 +502,7 @@ def test_end_tool_call_span_latest_conventions(mock_span):
502502 {
503503 "type" : "tool_call_response" ,
504504 "id" : tool_result .get ("toolUseId" , "" ),
505- "result" : serialize ( tool_result .get ("content" ) ),
505+ "result" : tool_result .get ("content" ),
506506 }
507507 ],
508508 }
@@ -559,7 +559,7 @@ def test_start_event_loop_cycle_span_latest_conventions(mock_tracer):
559559 "gen_ai.client.inference.operation.details" ,
560560 attributes = {
561561 "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" ]}]}]
563563 )
564564 },
565565 )
@@ -601,7 +601,7 @@ def test_end_event_loop_cycle_span_latest_conventions(mock_span):
601601 [
602602 {
603603 "role" : "assistant" ,
604- "parts" : [{"type" : "text" , "content" : serialize ( tool_result_message ["content" ]) }],
604+ "parts" : [{"type" : "text" , "content" : tool_result_message ["content" ]}],
605605 }
606606 ]
607607 )
@@ -676,7 +676,7 @@ def test_start_agent_span_latest_conventions(mock_tracer):
676676 "gen_ai.client.inference.operation.details" ,
677677 attributes = {
678678 "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" }]}]}]
680680 )
681681 },
682682 )
0 commit comments