atiaomar1978-hub opened a new pull request, #25507:
URL: https://github.com/apache/camel/pull/25507

   _AI-generated on behalf of atiaomar1978-hub_
   
   ## Summary
   
   Phase 3 of [CAMEL-23861](https://issues.apache.org/jira/browse/CAMEL-23861) 
extends GenAI observability beyond Phase 1 (langchain4j/openai) and Phase 2 
(TUI usage view):
   
   - **Spring AI chat** (`spring-ai-chat`) producers now emit GenAI 
OpenTelemetry span attributes and record token usage via `GenAiObservability`, 
matching the langchain4j-chat pattern.
   - **Camel Main typed configuration** for the global toggle 
`camel.ai.observability.enabled` (CAMEL-24386): application.properties, 
programmatic `main.configure().ai().observability().withEnabled(false)`, and 
metadata/docs.
   - **GenAiModelResolver** extended with reflection-based Spring AI 
provider/model resolution (no hard dependency on Spring AI in the API module).
   
   ## Changes
   
   | Area | Details |
   |------|---------|
   | `SpringAiChatProducer` | Wraps chat, structured output, and entity calls 
with `GenAiObservability` |
   | `GenAiModelResolver` | Spring AI package + options/response metadata 
resolution |
   | `camel-main` | `AiConfigurationProperties` / 
`AiObservabilityConfigurationProperties`, auto-config in `BaseMainSupport` |
   | `PrepareCamelMainMojo` | Metadata prefix fix: 
`camel.ai.observability.enabled` (not `camel.main.enabled`) |
   | Docs | `ai-observability.adoc`, upgrade guide 4.23 entry for Spring AI + 
Main config |
   | Tests | `SpringAiChatObservabilityTest`, 
`AiObservabilityConfigurationPropertiesTest`, `GenAiModelResolverTest` (Spring 
AI) |
   
   ## Testing
   
   ```bash
   ./mvnw -pl 
components/camel-ai/camel-ai-observability-api,components/camel-ai/camel-ai-observability,components/camel-spring-parent/camel-spring-ai/camel-spring-ai-chat,core/camel-main
 -am test \
     
-Dtest=GenAiModelResolverTest,SpringAiChatObservabilityTest,AiObservabilityConfigurationPropertiesTest,GenAiObservabilityTest
   ```
   
   ## Related
   
   - Phase 1: #25337
   - Phase 2: #25491
   - JIRA: https://issues.apache.org/jira/browse/CAMEL-23861


-- 
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