File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -839,7 +839,9 @@ def _add_system_prompt_event(
839839 if system_prompt is None and system_prompt_content is None :
840840 return
841841
842- content_blocks = system_prompt_content if system_prompt_content else [{"text" : system_prompt }]
842+ content_blocks : list [ContentBlock ] = (
843+ system_prompt_content if system_prompt_content else [{"text" : system_prompt or "" }]
844+ )
843845
844846 if self .use_latest_genai_conventions :
845847 parts = self ._map_content_blocks_to_otel_parts (content_blocks )
Original file line number Diff line number Diff line change @@ -88,10 +88,7 @@ def test_reasoning_content_multi_turn(client_args):
8888
8989 # Verify reasoning content was produced
9090 has_reasoning = any (
91- "reasoningContent" in block
92- for msg in agent .messages
93- if msg ["role" ] == "assistant"
94- for block in msg ["content" ]
91+ "reasoningContent" in block for msg in agent .messages if msg ["role" ] == "assistant" for block in msg ["content" ]
9592 )
9693 assert has_reasoning
9794
You can’t perform that action at this time.
0 commit comments