davsclaus opened a new pull request, #30967: URL: https://github.com/apache/camel/pull/30967
# Description Part of [CAMEL-23832](https://issues.apache.org/jira/browse/CAMEL-23832). The umbrella ticket stays open. ## Summary This PR rewrites the component description, 17 option texts (15 shared by the component and the endpoint, plus the component `configuration` and the `agentId` path) and 15 header texts of `langchain4j-agent`. The sources are the Camel code (producer, type converter, MCP server definition, component) and LangChain4j 1.24.0 (`AiServices`, `ToolService`, `FinishReason`, `@CompensateFor`). These old texts were wrong or incomplete: - `compensateOnToolErrors` did not say what it does. LangChain4j runs the `@CompensateFor` actions when a tool fails. - The tool-calling options and `outputClass`/`jsonSchema` said they need `agentConfiguration`. They also work with `provider`, because the component then creates the `AgentConfiguration` itself. - `provider` said it is ignored only when an AgentConfiguration is set. It is ignored when `agent` or `agentFactory` is set too. - `jsonSchema` said "validation". The schema goes to the model as the response format, and no answer is validated against it. - `CamelLangChain4jAgentUserMessage` mentioned only a `WrappedFile`. The header also applies to a `File`, a `Path`, bytes and a stream, and it replaces a text body. - The system message, memory id, token count and finish reason headers had texts such as "Memory ID." or "The Finish Reason." They now say what the value is, and that the token counts are summed over all model calls. - `agentId` did not say that the producer looks up an `Agent` bean with that name when no agent option is set. The header texts are in `Headers` of `camel-langchain4j-agent-api`. Only the `langchain4j-agent` JSON uses that class, so no other component JSON changes. ### Found, not changed - The `CamelLangChain4jAgentResponseModel` header is documented, but no code sets it. The text now says so. - The Javadoc of `AgentConfiguration.withCompensateOnToolErrors` (api module), and the table row for it in `langchain4j-agent-component.adoc`, say that the option "sends tool errors back to the LLM". LangChain4j runs the `@CompensateFor` compensating actions instead. - The tags of the `tags` option and of the `CamelLangChain4jAgentExcludeTags` header are split on `,` without trimming before the exclusion is applied. So `tags=a, b` with the header `b` does not exclude `b`, because the tag is ` b`. - With `mcpServer.<name>.oauthProfile`, the producer gets the bearer token once, when it starts, and keeps it as a fixed header of the HTTP transport. The producer does not refresh an expired token. - The `provider` text says "Camel JBang downloads it". The CLI is now called Camel CLI. ## Tests - There is no new test, as only description text changes. - A script compared the component JSON with the parent commit: only `description` fields changed (48 texts: the component, 16 component options, 16 endpoint options, 15 headers). # Target - [x] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch) # Tracking - [x] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it). # Apache Camel coding standards and style - [x] I checked that each commit in the pull request has a meaningful subject line and body. - [x] I ran the formatter and built the module, then regenerated the catalog copy, `dsl/camel-endpointdsl` and `dsl/camel-componentdsl`, and committed all generated changes. # AI-assisted contributions - [x] If this PR includes AI-generated code, commits have proper co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR description identifies the AI tool used. _Claude Code on behalf of davsclaus_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
