luigidemasi opened a new pull request, #26684: URL: https://github.com/apache/camel/pull/26684
# Description Add `camel-jev` under `components/camel-ai` for [CAMEL-24871](https://issues.apache.org/jira/browse/CAMEL-24871). The component calls TypeSafe AI's HTTP API directly using the JDK HTTP client and `camel-util-json`; it has no external Jev SDK dependency. The producer supports Noul, Choice, Score, and mixed batches. Routes can configure questions and Simple state selection entirely through component/endpoint properties, or supply a complete request map in the body. Responses preserve the API's structured answer, model, and usage fields. A result property can retain the original body. The `jev` language evaluates a configured Noul question as a standard Camel predicate or Boolean expression. Credentials, model, question, selected state, explicit threshold, and uncertainty policy are configurable through properties; Java, XML, and YAML routes need no manually registered bean. `JevPredicate` is also available for programmatic use. Producers and predicates share the Camel-owned endpoint/client, while each invocation evaluates fresh state. A standard `JevExpression` model enables language metadata and DSL generation without changing core predicate or EIP semantics. Request timeout, caller interruption, and endpoint shutdown cancel the actual HTTP transfer, including stalled response bodies. HTTP errors omit response bodies that may echo submitted data. Invalid or inconsistent answers propagate as failures instead of becoming business fallbacks. The component performs no application-level retries or implicit response caching. Documentation includes property-only Java/XML/YAML examples, a worked Choice classification route with explicit uncertainty routing, and an assessment of Dynamic Router, Recipient List, Aggregator, and Enricher composition. Routing examples use deterministic HTTP fixtures; live model accuracy, latency, and billing have not been measured. # Validation - `mvn -B -ntp verify` in `components/camel-ai/camel-jev`: 93 tests passed against local HTTP fixtures, without live credentials. - `mvn -B -ntp clean install -DskipTests` from the repository root: all 693 reactor modules passed. - `mvn -B -ntp -Dtest=JevPropertiesYamlDslTest verify` in the YAML DSL module: both generic and native Jev syntax passed using property-only configuration. - All 93 component tests also passed with the Surefire test JVM running Java 17.0.13 (Maven ran on Java 21). - Runtime dependency tree contains neither `jev-java` nor Gson. - Generated component and language metadata expose property configuration and mark credentials as secret and required; documentation mirrors are regenerated. # Target - [x] Targets `main` (Camel 4.23.0-SNAPSHOT). # Tracking - [x] Tracked by CAMEL-24871. # Apache Camel coding standards and style - [x] Commit has a meaningful subject and body. - [x] Full root build passed and related generated changes are committed. # AI-assisted contributions - [x] Commit includes AI co-authorship, SSH signing, and Signed-off-by. Generated by Codex on behalf of `luigidemasi` via /oss-fix-issue. -- 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]
