gnodet opened a new pull request, #25274:
URL: https://github.com/apache/camel/pull/25274

   _Claude Code on behalf of gnodet_
   
   ## Summary
   
   Completes `AgentConfiguration` coverage of the LangChain4j `AiServices` 
builder API, following up on CAMEL-23928.
   
   ### Added
   
   - **Guardrail instances** (`inputGuardrails` / `outputGuardrails`): 
pre-instantiated guardrail objects for DI-friendly usage (Spring/Quarkus CDI), 
complementing the existing class-based support. This is a prerequisite for 
CAMEL-23344 (route-based guardrails that need a `CamelContext`-aware instance)
   - **Guardrail configuration** (`inputGuardrailsConfig` / 
`outputGuardrailsConfig`): config objects controlling retry policies and other 
guardrail behavior
   - **Tool execution hooks** (`beforeToolExecution` / `afterToolExecution`): 
callbacks invoked before/after each tool execution — the natural hook for 
per-tool-call logging, Camel events, Micrometer metrics and OTel spans. 
Foundation for CAMEL-23861
   
   ### Deliberately not added
   
   - **`maxSequentialToolsInvocations`**: deprecated alias for 
`maxToolCallingRoundTrips` (already exposed) since LangChain4j 1.15.0
   - **`immediateReturnToolNames`**: no standalone `AiServices` builder method; 
already available via `ToolProviderResult` in the `ToolProvider` path (used by 
Camel route tools and MCP tools)
   
   ### Also
   
   - Improved `aiServicesCustomizer` Javadoc to document the 
`chatRequestTransformer` conflict with `responseFormat`/structured output
   - Documented builder options deliberately left for the escape hatch 
(`toolSearchStrategy`, `storeRetrievedContentInChatMemory`, `AiServiceListener`)
   
   ## Test plan
   
   - [x] Added unit tests for all 6 new fields in `AgentConfigurationTest` 
(getter/setter, fluent chaining, default values)
   - [x] Updated `testFluentChaining()` to include all new fields
   - [x] Module tests pass: 195 tests, 0 failures
   - [ ] CI green
   
   🤖 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]

Reply via email to