Skip to content

Commit 7b4df8a

Browse files
fix: fix type imcompatible (#2018)
1 parent e267a64 commit 7b4df8a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/strands/telemetry/tracer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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)

tests_integ/models/test_model_mantle.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)