Skip to content

Commit 66c4c07

Browse files
committed
feat: add max tokens reached test
1 parent 623f3c7 commit 66c4c07

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/strands/agent/conversation_manager/recover_tool_use_on_max_tokens_reached.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ async def recover_tool_use_on_max_tokens_reached(agent: "Agent", exception: MaxT
3232
logger.info("handling MaxTokensReachedException - inspecting incomplete message for invalid tool uses")
3333

3434
incomplete_message: Message = exception.incomplete_message
35-
logger.warning(f"incomplete message {incomplete_message}")
3635

3736
if not incomplete_message["content"]:
3837
# Cannot correct invalid content block if content is empty
@@ -58,7 +57,6 @@ async def recover_tool_use_on_max_tokens_reached(agent: "Agent", exception: MaxT
5857
f"to maximum token limits being reached."
5958
}
6059
)
61-
has_corrected_content = True
6260
else:
6361
# ToolUse was invalid for an unknown reason. Cannot correct, return without modifying
6462
raise exception

0 commit comments

Comments
 (0)