davsclaus commented on code in PR #26606:
URL: https://github.com/apache/camel/pull/26606#discussion_r4061167581
##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc:
##########
@@ -622,6 +622,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 deprecated in favour of `llm()`. Use
`llm(path)` or `openai(path)`
+(both delegate to the same component). The Component DSL still exposes both
+`Components.llm()` and `Components.openai()`.
+
+If you migrate routes from `openai:` to `llm:` URIs, copy any
`camel.component.openai.*`
+properties to `camel.component.llm.*` — the two schemes use independent
component instances.
+
+`Component.getDefaultName()` returns the first scheme declared in
`@Component("llm,openai")`
+(`"llm"`) for both `llm` and `openai` component instances.
+
+See xref:components:openai-component.adoc[LLM Component] for details.
Review Comment:
This is the xref that fails `xref-check` on CI - the components module needs
the double colon.
```suggestion
See xref:components::openai-component.adoc[LLM Component] for details.
```
##########
components/camel-ai/camel-openai/src/main/docs/openai-component.adoc:
##########
@@ -1,8 +1,8 @@
= OpenAI Component
Review Comment:
The heading still says `OpenAI Component` while `:doctitle:` below is `LLM`
- they should match, e.g. `= LLM Component`.
##########
tooling/spi-annotations/src/main/java/org/apache/camel/spi/UriEndpoint.java:
##########
@@ -203,4 +203,11 @@
* this to false for internal components such as log, message
transformations and other kinds.
*/
boolean remote() default true;
+
+ /**
+ * Comma-separated scheme names that are backward-compatible aliases of
the primary scheme and should be marked
+ * {@code @Deprecated} in the Endpoint DSL. Peer schemes such as {@code
http}/{@code https} or {@code coap}/
+ * {@code coaps} must not be listed here.
+ */
+ String deprecatedSchemes() default "";
Review Comment:
This is a public SPI annotation used by every component and by external
tooling, so a new attribute here is a permanent API. For a Phase 1 alias it
should not be needed at all - see the review body: ordering the schemes
`openai,llm` keeps every existing generated helper intact without any generator
change.
##########
components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIEndpoint.java:
##########
@@ -73,13 +73,14 @@
import org.slf4j.LoggerFactory;
/**
- * 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 {@code openai} scheme is a
supported alias.
*/
@UriEndpoint(firstVersion = "4.17.0",
- scheme = "openai",
- title = "OpenAI",
- syntax = "openai:operation",
+ scheme = "llm,openai",
+ deprecatedSchemes = "openai",
Review Comment:
Deprecating the `openai` scheme was not part of the Phase 1 agreement on
CAMEL-24339 ("`openai` stays as a working alias"). Please drop this; if we ever
want to deprecate the scheme that should be a separate dev-list decision.
--
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]