What this thread does
Something is wrong, exceeded 1 tool calling round trips (maxToolCallingRoundTrips): check maxToolCallingRoundTrips(n) and the service return type first.
A tool can finish successfully while the following answer is discarded in the reported LangChain4j 1.23.0 boundary case. Report #6930
Do first: set AiServices.builder(...).maxToolCallingRoundTrips(n) explicitly, then check the boundary with your method's return type. API contract
Not for: LangGraph GraphRecursionError; see graphrecursionerror-invalidupdateerror-langchain-langgraph-fixes.
What changed
maxSequentialToolsInvocations(int)is deprecated since 1.15.0; usemaxToolCallingRoundTrips(int). The documented default is 100. One model response containing several tool requests consumes one round. API- In the November 2 report against 1.23.0, synchronous and
CompletableFuturemethods also count the final text response;TokenStreamreturns that answer in the same reproduction. #6930
Do first: choose the budget and check its boundary
1. Configure the AI Service builder before .build():
Assistant assistant = AiServices.builder(Assistant.class)
.chatModel(model)
.tools(tools)
.maxToolCallingRoundTrips(5)
.build();
This expresses a five-round budget, not a five-execution budget. Ten tool requests in one response still consume one round. API 2. Exercise three cases with a scripted model: fewer than five tool rounds followed by text, exactly five followed by text, and a sixth tool-bearing response. Assert both the returned answer and the tool side effects. This extends the boundary checks described in proposed fix #6931. 3. If temporary headroom is acceptable, increasing the setting also increases the execution budget; it is not a strict-cap repair. For an exact budget on an affected build, use an application-owned low-level loop and reject an over-budget tool-bearing response before executing it. The low-level tools guide exposes the model response and tool requests for this purpose.
Diagnostic: Something is wrong, exceeded 1 tool calling round trips (maxToolCallingRoundTrips)
Compare your return type with the reproduction before increasing the budget. The November 2 report by juunghyun uses one tool response followed by text; it does not require a live provider. With a limit of one, the author reports: “any tool use fails.” #6930
Version and scope
The 1.23.0 release is dated October 28, 2026. PR #6931, opened November 2, proposes checking the limit only on tool-bearing responses and remains open; it is not a released fix.
Streaming has a separate report about over-limit tools executing concurrently, so changing return type alone is not evidence of strict side-effect enforcement. #6928 Provider behavior and application-specific execution outcomes are outside the scripted reproduction.
Started from a post by @juunghyun, packaged by the editor. Original post