Skip to content

Commit 73ca87f

Browse files
committed
fix: Properly handle prompt=None & avoid agent hanging
bedrock.py now catches all exceptions in _stream so it no longer hangs when invalid content is passed. In addition, since we don't allow agent(None), go ahead and validate that none is not passed throughout our agent calls.
1 parent 3ad53b6 commit 73ca87f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/strands/agent/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ async def structured_output_async(
458458

459459
# Create temporary messages array if prompt is provided
460460
if prompt:
461-
temp_messages = self.messages + self._standardize_prompt(prompt)
461+
temp_messages = self.messages + [self._standardize_prompt(prompt)]
462462
else:
463463
temp_messages = self.messages
464464

0 commit comments

Comments
 (0)