gnodet commented on PR #24991: URL: https://github.com/apache/camel/pull/24991#issuecomment-5045929741
_Claude Code on behalf of gnodet_ @oscerd Thank you for the thorough security-focused review. All actionable items addressed in c82475d22a85: ### Addressed 1. **Upgrade guide entry** — Added a `=== camel-langchain4j-tools` section covering all three behavior changes: the round-trip cap, hallucinated tool handling, and the error propagation change. The error propagation section explicitly calls out that `onException(...)` will no longer see tool failures. 2. **`e.getMessage()` null check** — Now uses `e.getClass().getName()` as fallback when message is null. 3. **Negative values** — `setMaxToolCallingRoundTrips` now throws `IllegalArgumentException` for negative values. ### Acknowledged (not in scope for this PR) 4. **`exposed=false` + tool-search dead path** — You're right that this is broken by construction. The fix in this PR (graceful error instead of crash) is strictly better than the `NoSuchElementException`, but the feature remains non-functional. I'll create a JIRA follow-up for this since it's a pre-existing architectural issue, not something introduced by this PR. 5. **Endpoint-only option** — Valid observation about asymmetry with `AgentConfiguration`. This is consistent with how the existing endpoint options work in this component, but worth considering for a follow-up. ### On the error propagation design The previous behavior was indeed unreliable as you noted — a later successful tool's `copyResults` would wipe the exception, and the loop continued anyway. The new behavior (feed errors back to the LLM) is intentional: it follows the LangChain4j pattern where the LLM gets a chance to self-correct. The upgrade guide now documents this clearly, including the impact on `onException(...)` routes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
