fix(agent): finalize max-iteration turns without tools

This commit is contained in:
chengyongru
2026-06-10 14:47:20 +08:00
committed by Xubin Ren
parent 99f7f371fa
commit 5d91d59cf7
9 changed files with 199 additions and 18 deletions
+2 -1
View File
@@ -64,7 +64,8 @@ async def test_loop_goal_turn_uses_standard_iteration_budget(tmp_path):
)
assert stop_reason == "max_iterations"
assert loop.provider.chat_with_retry.await_count == 2
assert loop.provider.chat_with_retry.await_count == 3
assert loop.provider.chat_with_retry.await_args_list[-1].kwargs["tools"] is None
assert final_content == (
"I reached the maximum number of tool call iterations (2) "
"without completing the task. You can try breaking the task into smaller steps."