gnodet-bot commented on code in PR #26606:
URL: https://github.com/apache/camel/pull/26606#discussion_r4051841149


##########
dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OpenAIEndpointBuilderFactory.java:
##########
@@ -27,16 +27,17 @@
 import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
 
 /**
- * OpenAI endpoint for chat completion, Responses API, embeddings, audio
- * transcription, audio translation, and text-to-speech.
+ * LLM endpoint for chat completion, Responses API, embeddings, audio
+ * transcription, audio translation, and text-to-speech using OpenAI-compatible
+ * APIs. The openai scheme is a supported alias.
  * 
  * Generated by camel build tools - do NOT edit this file!
  */
 @Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
 public interface OpenAIEndpointBuilderFactory {

Review Comment:
   ⛔ **Blocker — stale/incomplete regeneration strips 28+ DSL builder methods**
   
   This generated file is missing a large number of `default 
OpenAIEndpointBuilder` methods that are still present on `main` and still 
backed by fields in `OpenAIConfiguration`. The deleted methods include 
(non-exhaustive):
   
   - `background(boolean/String)` — Responses API background execution
   - `connectTimeout(long/String)` / `readTimeout(long/String)` / 
`writeTimeout(long/String)` — all timeout controls
   - `conversationId(String)` — OpenAI Conversations API
   - `imageBackground(String)`, `imageCount(Integer/String)`, 
`imageInputFidelity(String)`, `imageModel(String)`, `imageModeration(String)`, 
`imageOutputCompression(Integer/String)`, `imageOutputFormat(String)`, 
`imagePrompt(String)`, `imageQuality(String)`, `imageResponseFormat(String)`, 
`imageSize(String)`, `imageStyle(String)` — all image generation/edit options
   - `moderationModel(String)` — moderation operation
   - `tags(String)` — route-tool discovery
   
   All these fields still exist in `OpenAIConfiguration.java` on this PR 
branch. Merging would silently remove users' ability to configure image 
generation, timeouts, background processing, and tool discovery from the Java 
Endpoint DSL — a hard regression unrelated to the scheme-alias feature.
   
   **Root cause:** the PR only ran `./mvnw -pl components/camel-ai/camel-openai 
test`, which does not regenerate the `camel-endpointdsl` module. The `mvn clean 
install -DskipTests` checkbox in the PR template is unchecked.
   
   **Fix:** run the full code-generator:
   ```
   ./mvnw -pl dsl/camel-endpointdsl generate-sources -Dfastinstall
   ```
   or follow the camel-package-maven-plugin documentation for the appropriate 
goal. Commit the regenerated file — it should be much larger than the current 
diff shows.



##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc:
##########
@@ -599,6 +599,32 @@ the underlying client exposes it (for example 
langchain4j-chat); the agent and e
 unavailable. See
 xref:next@components:others:ai-observability.adoc[AI Observability] for metric 
names and span attributes.
 
+=== camel-openai (LLM scheme alias)
+
+The `camel-openai` component now registers the primary URI scheme `llm` 
alongside the existing
+`openai` alias. Both schemes use the same component implementation and Maven 
artifact
+(`camel-openai`).
+
+* New routes should prefer `llm:chat-completion` (and other `llm:` operations) 
for discoverability.
+* Existing routes using `openai:chat-completion` continue to work unchanged.
+* Component configuration properties accept both prefixes: 
`camel.component.llm.*` and
+  `camel.component.openai.*` create independent component instances when both 
are set.
+
+Java packages, exchange headers (`CamelOpenAI*`), and the Maven artifact id 
are unchanged.
+
+When using the Java Endpoint DSL, the primary scheme name changes generated 
helper methods:
+`EndpointHeaderBuilders.openai()` is replaced by `llm()`. Use `llm(path)` or 
`openai(path)`

Review Comment:
   🔧 **Inaccurate wording — `openai()` is deprecated, not removed**
   
   The sentence says "`EndpointHeaderBuilders.openai()` is replaced by 
`llm()`", which implies the old method was deleted. It wasn't — it's still 
present and annotated `@Deprecated`. Users who read this will think their code 
stopped compiling, when in fact they only get a deprecation warning.
   
   ```suggestion
   `EndpointHeaderBuilders.openai()` is deprecated in favour of `llm()`. Use 
`llm(path)` or `openai(path)`
   ```



##########
dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java:
##########
@@ -12751,12 +12806,13 @@ public static 
OpaEndpointBuilderFactory.OpaEndpointBuilder opa(String componentN
      * @return the dsl builder
      */
     public static OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder 
openai(String path) {

Review Comment:
   ⚠️ **Missing `@Deprecated` on `openai(String path)`**
   
   The sibling methods in this PR are annotated consistently:
   - `EndpointHeaderBuilders.openai()` → `@Deprecated` ✅ (fixed in latest 
commit)
   - `OpenAIBuilders.openai()` in the interface → `@Deprecated` ✅ (fixed in 
latest commit)
   
   But `StaticEndpointBuilders.openai(String path)` here is NOT annotated 
`@Deprecated`. Users calling `StaticEndpointBuilders.openai("...")` directly 
get no deprecation warning. The velocity template change in 
`endpoint-headers-builders.vm` correctly adds `@Deprecated` for header-builder 
aliases; the equivalent fix for endpoint-builder aliases in 
`endpoint-builder.vm` should also apply here, or the annotation must be added 
manually if this file is only partially regenerated.
   
   ```suggestion
       @Deprecated
       public static OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder 
openai(String path) {
           return llm("openai", path);
       }
   ```



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