We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41338ec commit 45ef6ceCopy full SHA for 45ef6ce
src/strands/agent/agent.py
@@ -583,11 +583,9 @@ async def stream_async(
583
if invocation_state is not None:
584
merged_state = invocation_state
585
586
- # Get callback handler from merged state or use default
587
- invocation_state_dict = merged_state.get("invocation_state", {})
588
- callback_handler = invocation_state_dict.get(
589
- "callback_handler", merged_state.get("callback_handler", self.callback_handler)
590
- )
+ callback_handler = self.callback_handler
+ if kwargs:
+ callback_handler = kwargs.get("callback_handler", self.callback_handler)
591
592
# Process input and get message to add (if any)
593
messages = self._convert_prompt_to_messages(prompt)
0 commit comments