This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new b8d53dbb791a CAMEL-24339: camel-openai - add llm scheme alias for
OpenAI-compatible APIs
b8d53dbb791a is described below
commit b8d53dbb791a883350cf62edb518aed280ab333c
Author: Omar Atie <[email protected]>
AuthorDate: Mon Sep 28 08:09:26 2026 -0700
CAMEL-24339: camel-openai - add llm scheme alias for OpenAI-compatible APIs
The camel-openai component now registers the llm URI scheme alongside the
existing openai scheme, so routes can use llm:chat-completion (or any other
operation) as well as openai:chat-completion. The component works with any
OpenAI-compatible API (Ollama, vLLM, LM Studio, OpenRouter, Azure OpenAI),
and the llm scheme makes that easier to discover.
Both schemes use the same component implementation, headers (CamelOpenAI*)
and Maven artifact (camel-openai). The llm and openai schemes create
independent component instances, so component configuration applies to the
scheme it is set for (camel.component.llm.* or camel.component.openai.*).
Existing openai: routes are unchanged.
The catalog gets an llm.json entry, the endpoint DSL an llm() builder,
camel run maps llm: to camel-openai, and the docs and upgrade guide
describe the alias.
Closes #26606
Co-authored-by: Omar Atie <[email protected]>
Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Cursor <[email protected]>
---
.../org/apache/camel/catalog/components.properties | 1 +
.../org/apache/camel/catalog/components/llm.json | 11 +-
.../apache/camel/catalog/components/openai.json | 3 +-
.../camel/catalog/docs/openai-component.adoc | 12 ++-
components/camel-ai/camel-openai/pom.xml | 2 +-
.../component/openai/OpenAIEndpointUriFactory.java | 8 +-
.../component/openai/{openai.json => llm.json} | 11 +-
.../org/apache/camel/component/openai/openai.json | 3 +-
.../services/org/apache/camel/component.properties | 4 +-
.../services/org/apache/camel/component/llm | 2 +
.../org/apache/camel/configurer/llm-component | 2 +
.../org/apache/camel/configurer/llm-endpoint | 2 +
.../src/main/docs/openai-component.adoc | 12 ++-
.../camel/component/openai/OpenAIComponent.java | 6 +-
.../camel/component/openai/OpenAIEndpoint.java | 8 +-
.../component/openai/OpenAISchemeAliasTest.java | 118 +++++++++++++++++++++
components/camel-ai/src/main/docs/ai-summary.adoc | 4 +-
.../org/apache/camel/main/components.properties | 1 +
.../java/org/apache/camel/util/ArtifactUtils.java | 1 +
.../components/modules/ROOT/examples/json/llm.json | 1 +
.../ROOT/pages/camel-4x-upgrade-guide-4_23.adoc | 15 +++
.../component/ComponentsBuilderFactory.java | 20 +++-
...actory.java => LlmComponentBuilderFactory.java} | 44 ++++----
.../dsl/OpenaiComponentBuilderFactory.java | 10 +-
.../builder/endpoint/EndpointHeaderBuilders.java | 5 +-
.../builder/endpoint/StaticEndpointBuilders.java | 40 ++++++-
.../endpoint/dsl/OpenAIEndpointBuilderFactory.java | 51 +++++++--
27 files changed, 326 insertions(+), 71 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
index de15a85dc7ca..1b689f1d0085 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
@@ -251,6 +251,7 @@ langchain4j-web-search
language
ldap
ldif
+llm
log
lpr
lucene
diff --git
a/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/openai.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/llm.json
similarity index 99%
copy from
components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/openai.json
copy to
catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/llm.json
index 307d47bf7908..c052860fbcf8 100644
---
a/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/openai.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/llm.json
@@ -1,9 +1,9 @@
{
"component": {
"kind": "component",
- "name": "openai",
- "title": "OpenAI",
- "description": "OpenAI endpoint for chat completion, Responses API,
embeddings, audio transcription, audio translation, and text-to-speech.",
+ "name": "llm",
+ "title": "LLM",
+ "description": "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.",
"deprecated": false,
"firstVersion": "4.17.0",
"label": "ai",
@@ -12,9 +12,10 @@
"groupId": "org.apache.camel",
"artifactId": "camel-openai",
"version": "4.23.0-SNAPSHOT",
- "scheme": "openai",
+ "scheme": "llm",
"extendsScheme": "",
- "syntax": "openai:operation",
+ "alternativeSchemes": "openai,llm",
+ "syntax": "llm:operation",
"async": false,
"api": false,
"consumerOnly": false,
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/openai.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/openai.json
index 307d47bf7908..09982cd59edd 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/openai.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/openai.json
@@ -3,7 +3,7 @@
"kind": "component",
"name": "openai",
"title": "OpenAI",
- "description": "OpenAI endpoint for chat completion, Responses API,
embeddings, audio transcription, audio translation, and text-to-speech.",
+ "description": "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.",
"deprecated": false,
"firstVersion": "4.17.0",
"label": "ai",
@@ -14,6 +14,7 @@
"version": "4.23.0-SNAPSHOT",
"scheme": "openai",
"extendsScheme": "",
+ "alternativeSchemes": "openai,llm",
"syntax": "openai:operation",
"async": false,
"api": false,
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-component.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-component.adoc
index 24c1efebf5e4..513e9b2e9575 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-component.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-component.adoc
@@ -2,7 +2,7 @@
:doctitle: OpenAI
:shortname: openai
:artifactid: camel-openai
-:description: OpenAI endpoint for chat completion, Responses API, embeddings,
audio transcription, audio translation, and text-to-speech.
+:description: 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.
:since: 4.17
:supportlevel: Stable
:tabs-sync-option:
@@ -14,7 +14,9 @@
*{component-header}*
-The OpenAI component provides integration with OpenAI and OpenAI-compatible
APIs for chat completion, text embeddings, content moderation, audio
transcription, audio translation, text-to-speech, and image generation and
editing using the official openai-java SDK.
+The LLM component provides integration with OpenAI and OpenAI-compatible APIs
(Ollama, vLLM, LM Studio, OpenRouter, Azure OpenAI, and others) for chat
completion, text embeddings, content moderation, audio transcription, audio
translation, text-to-speech, and image generation and editing using the
official openai-java SDK.
+
+The Maven artifact remains `camel-openai`. Routes may use either the `llm:` or
the `openai:` scheme.
Maven users will need to add the following dependency to their `pom.xml` for
this component:
@@ -32,9 +34,13 @@ Maven users will need to add the following dependency to
their `pom.xml` for thi
[source]
----
-openai:operation[?options]
+llm:operation[?options]
----
+The `openai:` scheme is a supported alias (`openai:operation[?options]`) for
existing routes.
+
+TIP: Prefer `llm:` in new routes for discoverability. Examples below use
`openai:` for backward compatibility; substitute `llm:` in the operation URI
when starting a new integration.
+
Supported operations:
* `chat-completion` - Generate chat completions using language models
diff --git a/components/camel-ai/camel-openai/pom.xml
b/components/camel-ai/camel-openai/pom.xml
index c21887d34035..fcf8a81842fc 100644
--- a/components/camel-ai/camel-openai/pom.xml
+++ b/components/camel-ai/camel-openai/pom.xml
@@ -31,7 +31,7 @@
<artifactId>camel-openai</artifactId>
<packaging>jar</packaging>
<name>Camel :: AI :: OpenAI</name>
- <description>Camel OpenAI component for chat completion using OpenAI
API</description>
+ <description>Camel LLM component (OpenAI-compatible API) for chat
completion, embeddings, audio, and images</description>
<properties>
<failsafe.rerunFailingTestsCount>3</failsafe.rerunFailingTestsCount>
diff --git
a/components/camel-ai/camel-openai/src/generated/java/org/apache/camel/component/openai/OpenAIEndpointUriFactory.java
b/components/camel-ai/camel-openai/src/generated/java/org/apache/camel/component/openai/OpenAIEndpointUriFactory.java
index eeae870f78f9..69143dd42ac2 100644
---
a/components/camel-ai/camel-openai/src/generated/java/org/apache/camel/component/openai/OpenAIEndpointUriFactory.java
+++
b/components/camel-ai/camel-openai/src/generated/java/org/apache/camel/component/openai/OpenAIEndpointUriFactory.java
@@ -18,6 +18,7 @@ import org.apache.camel.spi.EndpointUriFactory;
public class OpenAIEndpointUriFactory extends
org.apache.camel.support.component.EndpointUriFactorySupport implements
EndpointUriFactory {
private static final String BASE = ":operation";
+ private static final String[] SCHEMES = new String[]{"openai", "llm"};
private static final Set<String> PROPERTY_NAMES;
private static final Set<String> SECRET_PROPERTY_NAMES;
@@ -150,7 +151,12 @@ public class OpenAIEndpointUriFactory extends
org.apache.camel.support.component
@Override
public boolean isEnabled(String scheme) {
- return "openai".equals(scheme);
+ for (String s : SCHEMES) {
+ if (s.equals(scheme)) {
+ return true;
+ }
+ }
+ return false;
}
@Override
diff --git
a/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/openai.json
b/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/llm.json
similarity index 99%
copy from
components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/openai.json
copy to
components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/llm.json
index 307d47bf7908..c052860fbcf8 100644
---
a/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/openai.json
+++
b/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/llm.json
@@ -1,9 +1,9 @@
{
"component": {
"kind": "component",
- "name": "openai",
- "title": "OpenAI",
- "description": "OpenAI endpoint for chat completion, Responses API,
embeddings, audio transcription, audio translation, and text-to-speech.",
+ "name": "llm",
+ "title": "LLM",
+ "description": "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.",
"deprecated": false,
"firstVersion": "4.17.0",
"label": "ai",
@@ -12,9 +12,10 @@
"groupId": "org.apache.camel",
"artifactId": "camel-openai",
"version": "4.23.0-SNAPSHOT",
- "scheme": "openai",
+ "scheme": "llm",
"extendsScheme": "",
- "syntax": "openai:operation",
+ "alternativeSchemes": "openai,llm",
+ "syntax": "llm:operation",
"async": false,
"api": false,
"consumerOnly": false,
diff --git
a/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/openai.json
b/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/openai.json
index 307d47bf7908..09982cd59edd 100644
---
a/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/openai.json
+++
b/components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/openai.json
@@ -3,7 +3,7 @@
"kind": "component",
"name": "openai",
"title": "OpenAI",
- "description": "OpenAI endpoint for chat completion, Responses API,
embeddings, audio transcription, audio translation, and text-to-speech.",
+ "description": "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.",
"deprecated": false,
"firstVersion": "4.17.0",
"label": "ai",
@@ -14,6 +14,7 @@
"version": "4.23.0-SNAPSHOT",
"scheme": "openai",
"extendsScheme": "",
+ "alternativeSchemes": "openai,llm",
"syntax": "openai:operation",
"async": false,
"api": false,
diff --git
a/components/camel-ai/camel-openai/src/generated/resources/META-INF/services/org/apache/camel/component.properties
b/components/camel-ai/camel-openai/src/generated/resources/META-INF/services/org/apache/camel/component.properties
index e997a71359a7..64437eabb2e3 100644
---
a/components/camel-ai/camel-openai/src/generated/resources/META-INF/services/org/apache/camel/component.properties
+++
b/components/camel-ai/camel-openai/src/generated/resources/META-INF/services/org/apache/camel/component.properties
@@ -1,7 +1,7 @@
# Generated by camel build tools - do NOT edit this file!
-components=openai
+components=llm openai
groupId=org.apache.camel
artifactId=camel-openai
version=4.23.0-SNAPSHOT
projectName=Camel :: AI :: OpenAI
-projectDescription=Camel OpenAI component for chat completion using OpenAI API
+projectDescription=Camel LLM component (OpenAI-compatible API) for chat
completion, embeddings, audio, and images
diff --git
a/components/camel-ai/camel-openai/src/generated/resources/META-INF/services/org/apache/camel/component/llm
b/components/camel-ai/camel-openai/src/generated/resources/META-INF/services/org/apache/camel/component/llm
new file mode 100644
index 000000000000..c4a02da9c69a
--- /dev/null
+++
b/components/camel-ai/camel-openai/src/generated/resources/META-INF/services/org/apache/camel/component/llm
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.openai.OpenAIComponent
diff --git
a/components/camel-ai/camel-openai/src/generated/resources/META-INF/services/org/apache/camel/configurer/llm-component
b/components/camel-ai/camel-openai/src/generated/resources/META-INF/services/org/apache/camel/configurer/llm-component
new file mode 100644
index 000000000000..c6d82e5acb36
--- /dev/null
+++
b/components/camel-ai/camel-openai/src/generated/resources/META-INF/services/org/apache/camel/configurer/llm-component
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.openai.OpenAIComponentConfigurer
diff --git
a/components/camel-ai/camel-openai/src/generated/resources/META-INF/services/org/apache/camel/configurer/llm-endpoint
b/components/camel-ai/camel-openai/src/generated/resources/META-INF/services/org/apache/camel/configurer/llm-endpoint
new file mode 100644
index 000000000000..937f3eaf9319
--- /dev/null
+++
b/components/camel-ai/camel-openai/src/generated/resources/META-INF/services/org/apache/camel/configurer/llm-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.openai.OpenAIEndpointConfigurer
diff --git
a/components/camel-ai/camel-openai/src/main/docs/openai-component.adoc
b/components/camel-ai/camel-openai/src/main/docs/openai-component.adoc
index 24c1efebf5e4..513e9b2e9575 100644
--- a/components/camel-ai/camel-openai/src/main/docs/openai-component.adoc
+++ b/components/camel-ai/camel-openai/src/main/docs/openai-component.adoc
@@ -2,7 +2,7 @@
:doctitle: OpenAI
:shortname: openai
:artifactid: camel-openai
-:description: OpenAI endpoint for chat completion, Responses API, embeddings,
audio transcription, audio translation, and text-to-speech.
+:description: 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.
:since: 4.17
:supportlevel: Stable
:tabs-sync-option:
@@ -14,7 +14,9 @@
*{component-header}*
-The OpenAI component provides integration with OpenAI and OpenAI-compatible
APIs for chat completion, text embeddings, content moderation, audio
transcription, audio translation, text-to-speech, and image generation and
editing using the official openai-java SDK.
+The LLM component provides integration with OpenAI and OpenAI-compatible APIs
(Ollama, vLLM, LM Studio, OpenRouter, Azure OpenAI, and others) for chat
completion, text embeddings, content moderation, audio transcription, audio
translation, text-to-speech, and image generation and editing using the
official openai-java SDK.
+
+The Maven artifact remains `camel-openai`. Routes may use either the `llm:` or
the `openai:` scheme.
Maven users will need to add the following dependency to their `pom.xml` for
this component:
@@ -32,9 +34,13 @@ Maven users will need to add the following dependency to
their `pom.xml` for thi
[source]
----
-openai:operation[?options]
+llm:operation[?options]
----
+The `openai:` scheme is a supported alias (`openai:operation[?options]`) for
existing routes.
+
+TIP: Prefer `llm:` in new routes for discoverability. Examples below use
`openai:` for backward compatibility; substitute `llm:` in the operation URI
when starting a new integration.
+
Supported operations:
* `chat-completion` - Generate chat completions using language models
diff --git
a/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIComponent.java
b/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIComponent.java
index ef6f2c11e9ca..717c10be39c1 100644
---
a/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIComponent.java
+++
b/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIComponent.java
@@ -26,9 +26,11 @@ import org.apache.camel.spi.annotations.Component;
import org.apache.camel.support.DefaultComponent;
/**
- * OpenAI component for chat completion, embeddings, and audio transcription.
+ * LLM component for chat completion, embeddings, audio, and images using
OpenAI-compatible APIs.
+ * <p>
+ * The {@code llm} scheme is registered alongside {@code openai}; both use the
same component implementation.
*/
-@Component("openai")
+@Component("openai,llm")
public class OpenAIComponent extends DefaultComponent implements
SSLContextParametersAware {
@Metadata(description = "Default API key for all endpoints", security =
"secret")
diff --git
a/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIEndpoint.java
b/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIEndpoint.java
index f807111daaf4..9076e97bca27 100644
---
a/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIEndpoint.java
+++
b/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIEndpoint.java
@@ -73,12 +73,12 @@ import org.slf4j.Logger;
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",
+ scheme = "openai,llm",
+ title = "OpenAI,LLM",
syntax = "openai:operation",
category = { Category.AI },
headersClass = OpenAIConstants.class)
diff --git
a/components/camel-ai/camel-openai/src/test/java/org/apache/camel/component/openai/OpenAISchemeAliasTest.java
b/components/camel-ai/camel-openai/src/test/java/org/apache/camel/component/openai/OpenAISchemeAliasTest.java
new file mode 100644
index 000000000000..99792f8d2ac4
--- /dev/null
+++
b/components/camel-ai/camel-openai/src/test/java/org/apache/camel/component/openai/OpenAISchemeAliasTest.java
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.openai;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.test.infra.openai.mock.OpenAIMock;
+import org.apache.camel.test.junit6.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class OpenAISchemeAliasTest extends CamelTestSupport {
+
+ @RegisterExtension
+ public OpenAIMock openAIMock = new OpenAIMock().builder()
+ .when("hello")
+ .replyWith("Hi from mock")
+ .end()
+ .build();
+
+ @Test
+ void llmAndOpenaiComponentsResolveToOpenAIComponent() {
+
assertThat(context.getComponent("llm")).isInstanceOf(OpenAIComponent.class);
+
assertThat(context.getComponent("openai")).isInstanceOf(OpenAIComponent.class);
+ }
+
+ @Test
+ void llmAndOpenaiComponentsAreIndependentInstances() {
+ OpenAIComponent llm = context.getComponent("llm",
OpenAIComponent.class);
+ OpenAIComponent openai = context.getComponent("openai",
OpenAIComponent.class);
+
+ assertThat(llm).isNotSameAs(openai);
+
+ llm.setModel("llm-model");
+ openai.setModel("openai-model");
+
+ assertThat(llm.getModel()).isEqualTo("llm-model");
+ assertThat(openai.getModel()).isEqualTo("openai-model");
+ }
+
+ @Test
+ void independentComponentConfigurationIsAppliedToEndpoints() throws
Exception {
+ OpenAIComponent llm = context.getComponent("llm",
OpenAIComponent.class);
+ OpenAIComponent openai = context.getComponent("openai",
OpenAIComponent.class);
+
+ llm.setBaseUrl(openAIMock.getBaseUrl() + "/v1");
+ llm.setApiKey("llm-key");
+ llm.setModel("llm-model");
+
+ openai.setBaseUrl(openAIMock.getBaseUrl() + "/v1");
+ openai.setApiKey("openai-key");
+ openai.setModel("openai-model");
+
+ OpenAIEndpoint llmEndpoint = (OpenAIEndpoint)
llm.createEndpoint("llm:chat-completion");
+ OpenAIEndpoint openaiEndpoint = (OpenAIEndpoint)
openai.createEndpoint("openai:chat-completion");
+
+
assertThat(llmEndpoint.getConfiguration().getApiKey()).isEqualTo("llm-key");
+
assertThat(openaiEndpoint.getConfiguration().getApiKey()).isEqualTo("openai-key");
+
assertThat(llmEndpoint.getConfiguration().getModel()).isEqualTo("llm-model");
+
assertThat(openaiEndpoint.getConfiguration().getModel()).isEqualTo("openai-model");
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = { "llm", "openai" })
+ void chatCompletionWorksForBothSchemes(String scheme) {
+ Exchange result = template.request("direct:" + scheme, e ->
e.getIn().setBody("hello"));
+ assertThat(result.getMessage().getBody(String.class)).isEqualTo("Hi
from mock");
+
assertThat(result.getMessage().getHeader(OpenAIConstants.RESPONSE_ID)).isNotNull();
+ }
+
+ @Test
+ void bothSchemesCreateChatCompletionEndpoints() throws Exception {
+ OpenAIEndpoint llmEndpoint
+ = (OpenAIEndpoint) context
+
.getEndpoint("llm:chat-completion?apiKey=dummy&baseUrl=" +
openAIMock.getBaseUrl() + "/v1");
+ OpenAIEndpoint openaiEndpoint
+ = (OpenAIEndpoint) context
+
.getEndpoint("openai:chat-completion?apiKey=dummy&baseUrl=" +
openAIMock.getBaseUrl() + "/v1");
+
+
assertThat(llmEndpoint.getOperation()).isEqualTo(OpenAIOperations.chatCompletion);
+
assertThat(openaiEndpoint.getOperation()).isEqualTo(OpenAIOperations.chatCompletion);
+
assertThat(llmEndpoint.getComponent().getDefaultName()).isEqualTo("openai");
+
assertThat(openaiEndpoint.getComponent().getDefaultName()).isEqualTo("openai");
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() {
+ String base = openAIMock.getBaseUrl() + "/v1";
+ return new RouteBuilder() {
+ @Override
+ public void configure() {
+ from("direct:llm")
+
.to("llm:chat-completion?model=gpt-5&apiKey=dummy&baseUrl=" + base);
+
+ from("direct:openai")
+
.to("openai:chat-completion?model=gpt-5&apiKey=dummy&baseUrl=" + base);
+ }
+ };
+ }
+}
diff --git a/components/camel-ai/src/main/docs/ai-summary.adoc
b/components/camel-ai/src/main/docs/ai-summary.adoc
index 3c2e57587d5c..a8324007d4ee 100644
--- a/components/camel-ai/src/main/docs/ai-summary.adoc
+++ b/components/camel-ai/src/main/docs/ai-summary.adoc
@@ -6,13 +6,13 @@ various AI-related technologies.
== Getting started with LLMs
-New to Camel AI? Start with the xref:ai-llm-integration-guide.adoc[LLM
Integration Guide] — it explains when to use xref:openai-component.adoc[OpenAI]
vs xref:langchain4j-chat-component.adoc[LangChain4j Chat], structured JSON
extraction, streaming to browsers, dynamic prompts, and prompt management
patterns.
+New to Camel AI? Start with the xref:ai-llm-integration-guide.adoc[LLM
Integration Guide] — it explains when to use xref:openai-component.adoc[LLM
(OpenAI-compatible)] vs xref:langchain4j-chat-component.adoc[LangChain4j Chat],
structured JSON extraction, streaming to browsers, dynamic prompts, and prompt
management patterns.
== Choosing the Right AI Component
Camel offers two main paths for integrating Large Language Models (LLMs) into
routes:
-* **xref:openai-component.adoc[OpenAI]** — talks directly to OpenAI and any
OpenAI-compatible API (OpenRouter, Ollama, vLLM, LM Studio). Native support for
streaming, structured output (`outputClass` / `jsonSchema`), MCP tool calling,
conversation memory, and the Responses API. Best when you are committed to the
OpenAI ecosystem or using an OpenAI-compatible gateway.
+* **xref:openai-component.adoc[LLM (OpenAI-compatible)]** — uses the `llm:`
URI scheme (with `openai:` as a backward-compatible alias) to talk to OpenAI
and any OpenAI-compatible API (OpenRouter, Ollama, vLLM, LM Studio). Native
support for streaming, structured output (`outputClass` / `jsonSchema`), MCP
tool calling, conversation memory, and the Responses API. Best when you are
committed to the OpenAI ecosystem or using an OpenAI-compatible gateway.
* **xref:langchain4j-chat-component.adoc[LangChain4j Chat]** — abstracts
through https://github.com/langchain4j/langchain4j[LangChain4j] so you can
switch LLM providers (OpenAI, Anthropic, Google Gemini, Mistral, Ollama, and
others) by swapping a dependency. Also provides prompt templates with
variables, RAG integration via the Content Enricher pattern, and multi-message
conversation history.
diff --git
a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
index de15a85dc7ca..1b689f1d0085 100644
---
a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
+++
b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
@@ -251,6 +251,7 @@ langchain4j-web-search
language
ldap
ldif
+llm
log
lpr
lucene
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/ArtifactUtils.java
b/core/camel-util/src/main/java/org/apache/camel/util/ArtifactUtils.java
index a5c3d66851b5..16b33d3cacf0 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/ArtifactUtils.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/ArtifactUtils.java
@@ -287,6 +287,7 @@ public final class ArtifactUtils {
Map.entry("language", "camel-language"),
Map.entry("ldap", "camel-ldap"),
Map.entry("ldif", "camel-ldif"),
+ Map.entry("llm", "camel-openai"),
Map.entry("log", "camel-log"),
Map.entry("lpr", "camel-printer"),
Map.entry("lucene", "camel-lucene"),
diff --git a/docs/components/modules/ROOT/examples/json/llm.json
b/docs/components/modules/ROOT/examples/json/llm.json
new file mode 120000
index 000000000000..7ec9b9db0352
--- /dev/null
+++ b/docs/components/modules/ROOT/examples/json/llm.json
@@ -0,0 +1 @@
+../../../../../../components/camel-ai/camel-openai/src/generated/resources/META-INF/org/apache/camel/component/openai/llm.json
\ No newline at end of file
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc
index d5a6dcc6fb92..1edcbea72f23 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc
@@ -1074,6 +1074,21 @@ 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 `llm` URI scheme alongside the
existing
+`openai` scheme. 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.
+
+See xref:components::openai-component.adoc[LLM Component] for details.
+
=== camel-archetypes
The Camel Maven archetypes now generate a `README.md` instead of the previous
`ReadMe.txt`, with the
diff --git
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
index d2701aa45770..2e561de5c9a8 100644
---
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
+++
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
@@ -3412,6 +3412,21 @@ public interface ComponentsBuilderFactory {
static LdifComponentBuilderFactory.LdifComponentBuilder ldif() {
return LdifComponentBuilderFactory.ldif();
}
+ /**
+ * LLM (camel-openai)
+ * 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.
+ *
+ * Category: ai
+ * Since: 4.17
+ * Maven coordinates: org.apache.camel:camel-openai
+ *
+ * @return the dsl builder
+ */
+ static LlmComponentBuilderFactory.LlmComponentBuilder llm() {
+ return LlmComponentBuilderFactory.llm();
+ }
/**
* Log Data (camel-log)
* Prints data from the routed message (such as body and headers) to the
@@ -3840,8 +3855,9 @@ public interface ComponentsBuilderFactory {
}
/**
* OpenAI (camel-openai)
- * 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.
*
* Category: ai
* Since: 4.17
diff --git
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/OpenaiComponentBuilderFactory.java
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LlmComponentBuilderFactory.java
similarity index 85%
copy from
dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/OpenaiComponentBuilderFactory.java
copy to
dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LlmComponentBuilderFactory.java
index 33b6d5c342fd..dd7d997faef5 100644
---
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/OpenaiComponentBuilderFactory.java
+++
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LlmComponentBuilderFactory.java
@@ -24,18 +24,20 @@ import org.apache.camel.builder.component.ComponentBuilder;
import org.apache.camel.component.openai.OpenAIComponent;
/**
- * 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.ComponentDslMojo")
-public interface OpenaiComponentBuilderFactory {
+public interface LlmComponentBuilderFactory {
/**
- * OpenAI (camel-openai)
- * OpenAI endpoint for chat completion, Responses API, embeddings, audio
- * transcription, audio translation, and text-to-speech.
+ * LLM (camel-openai)
+ * 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.
*
* Category: ai
* Since: 4.17
@@ -43,14 +45,14 @@ public interface OpenaiComponentBuilderFactory {
*
* @return the dsl builder
*/
- static OpenaiComponentBuilder openai() {
- return new OpenaiComponentBuilderImpl();
+ static LlmComponentBuilder llm() {
+ return new LlmComponentBuilderImpl();
}
/**
- * Builder for the OpenAI component.
+ * Builder for the LLM component.
*/
- interface OpenaiComponentBuilder extends ComponentBuilder<OpenAIComponent>
{
+ interface LlmComponentBuilder extends ComponentBuilder<OpenAIComponent> {
/**
* Default API key for all endpoints.
@@ -62,7 +64,7 @@ public interface OpenaiComponentBuilderFactory {
* @param apiKey the value to set
* @return the dsl builder
*/
- default OpenaiComponentBuilder apiKey(java.lang.String apiKey) {
+ default LlmComponentBuilder apiKey(java.lang.String apiKey) {
doSetProperty("apiKey", apiKey);
return this;
}
@@ -77,7 +79,7 @@ public interface OpenaiComponentBuilderFactory {
* @param audioModel the value to set
* @return the dsl builder
*/
- default OpenaiComponentBuilder audioModel(java.lang.String audioModel)
{
+ default LlmComponentBuilder audioModel(java.lang.String audioModel) {
doSetProperty("audioModel", audioModel);
return this;
}
@@ -94,7 +96,7 @@ public interface OpenaiComponentBuilderFactory {
* @param baseUrl the value to set
* @return the dsl builder
*/
- default OpenaiComponentBuilder baseUrl(java.lang.String baseUrl) {
+ default LlmComponentBuilder baseUrl(java.lang.String baseUrl) {
doSetProperty("baseUrl", baseUrl);
return this;
}
@@ -109,7 +111,7 @@ public interface OpenaiComponentBuilderFactory {
* @param embeddingModel the value to set
* @return the dsl builder
*/
- default OpenaiComponentBuilder embeddingModel(java.lang.String
embeddingModel) {
+ default LlmComponentBuilder embeddingModel(java.lang.String
embeddingModel) {
doSetProperty("embeddingModel", embeddingModel);
return this;
}
@@ -124,7 +126,7 @@ public interface OpenaiComponentBuilderFactory {
* @param model the value to set
* @return the dsl builder
*/
- default OpenaiComponentBuilder model(java.lang.String model) {
+ default LlmComponentBuilder model(java.lang.String model) {
doSetProperty("model", model);
return this;
}
@@ -152,7 +154,7 @@ public interface OpenaiComponentBuilderFactory {
* @param bridgeErrorHandler the value to set
* @return the dsl builder
*/
- default OpenaiComponentBuilder bridgeErrorHandler(boolean
bridgeErrorHandler) {
+ default LlmComponentBuilder bridgeErrorHandler(boolean
bridgeErrorHandler) {
doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
return this;
}
@@ -177,7 +179,7 @@ public interface OpenaiComponentBuilderFactory {
* @param lazyStartProducer the value to set
* @return the dsl builder
*/
- default OpenaiComponentBuilder lazyStartProducer(boolean
lazyStartProducer) {
+ default LlmComponentBuilder lazyStartProducer(boolean
lazyStartProducer) {
doSetProperty("lazyStartProducer", lazyStartProducer);
return this;
}
@@ -199,7 +201,7 @@ public interface OpenaiComponentBuilderFactory {
* @param autowiredEnabled the value to set
* @return the dsl builder
*/
- default OpenaiComponentBuilder autowiredEnabled(boolean
autowiredEnabled) {
+ default LlmComponentBuilder autowiredEnabled(boolean autowiredEnabled)
{
doSetProperty("autowiredEnabled", autowiredEnabled);
return this;
}
@@ -216,15 +218,15 @@ public interface OpenaiComponentBuilderFactory {
* @param useGlobalSslContextParameters the value to set
* @return the dsl builder
*/
- default OpenaiComponentBuilder useGlobalSslContextParameters(boolean
useGlobalSslContextParameters) {
+ default LlmComponentBuilder useGlobalSslContextParameters(boolean
useGlobalSslContextParameters) {
doSetProperty("useGlobalSslContextParameters",
useGlobalSslContextParameters);
return this;
}
}
- class OpenaiComponentBuilderImpl
+ class LlmComponentBuilderImpl
extends AbstractComponentBuilder<OpenAIComponent>
- implements OpenaiComponentBuilder {
+ implements LlmComponentBuilder {
@Override
protected OpenAIComponent buildConcreteComponent() {
return new OpenAIComponent();
diff --git
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/OpenaiComponentBuilderFactory.java
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/OpenaiComponentBuilderFactory.java
index 33b6d5c342fd..e45daa728626 100644
---
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/OpenaiComponentBuilderFactory.java
+++
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/OpenaiComponentBuilderFactory.java
@@ -24,8 +24,9 @@ import org.apache.camel.builder.component.ComponentBuilder;
import org.apache.camel.component.openai.OpenAIComponent;
/**
- * 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!
*/
@@ -34,8 +35,9 @@ public interface OpenaiComponentBuilderFactory {
/**
* OpenAI (camel-openai)
- * 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.
*
* Category: ai
* Since: 4.17
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java
index 104188aba41c..39430a9456c7 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java
@@ -2995,8 +2995,9 @@ public class EndpointHeaderBuilders {
}
/**
* OpenAI (camel-openai)
- * 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.
*
* Category: ai
* Since: 4.17
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index 3bd0b5a36ff3..23f6e0c90148 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -11232,6 +11232,36 @@ public class StaticEndpointBuilders {
public static LdifEndpointBuilderFactory.LdifEndpointBuilder ldif(String
componentName, String path) {
return LdifEndpointBuilderFactory.endpointBuilder(componentName, path);
}
+ /**
+ * LLM (camel-openai)
+ * 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.
+ *
+ * Category: ai
+ * Since: 4.17
+ * Maven coordinates: org.apache.camel:camel-openai
+ *
+ * Syntax: <code>llm:operation</code>
+ *
+ * Path parameter: operation (required)
+ * The operation to perform: 'chat-completion', 'responses',
+ * 'responses-retrieve', 'responses-cancel', 'batch', 'batch-retrieve',
+ * 'batch-cancel', 'batch-results', 'embeddings', 'tool-execution',
+ * 'audio-transcription', 'audio-translation', 'audio-speech',
'moderation',
+ * 'image-generation', 'image-edit', or 'webhook' (a consumer)
+ * There are 17 enums and the value can be one of: chat-completion,
+ * responses, responses-retrieve, responses-cancel, batch, batch-retrieve,
+ * batch-cancel, batch-results, embeddings, tool-execution,
+ * audio-transcription, audio-translation, audio-speech, moderation,
+ * image-generation, image-edit, webhook
+ *
+ * @param path operation
+ * @return the dsl builder
+ */
+ public static OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder
llm(String path) {
+ return openai("llm", path);
+ }
/**
* Log Data (camel-log)
* Prints data from the routed message (such as body and headers) to the
@@ -12728,8 +12758,9 @@ public class StaticEndpointBuilders {
}
/**
* OpenAI (camel-openai)
- * 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.
*
* Category: ai
* Since: 4.17
@@ -12757,8 +12788,9 @@ public class StaticEndpointBuilders {
}
/**
* OpenAI (camel-openai)
- * 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.
*
* Category: ai
* Since: 4.17
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OpenAIEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OpenAIEndpointBuilderFactory.java
index dfbb7c480d2e..a5007e168214 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OpenAIEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OpenAIEndpointBuilderFactory.java
@@ -27,8 +27,9 @@ import org.apache.camel.builder.EndpointProducerBuilder;
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!
*/
@@ -6987,8 +6988,9 @@ public interface OpenAIEndpointBuilderFactory {
public interface OpenAIBuilders {
/**
* OpenAI (camel-openai)
- * 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.
*
* Category: ai
* Since: 4.17
@@ -7001,8 +7003,9 @@ public interface OpenAIEndpointBuilderFactory {
}
/**
* OpenAI (camel-openai)
- * 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.
*
* Category: ai
* Since: 4.17
@@ -7031,8 +7034,9 @@ public interface OpenAIEndpointBuilderFactory {
}
/**
* OpenAI (camel-openai)
- * 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.
*
* Category: ai
* Since: 4.17
@@ -7061,6 +7065,37 @@ public interface OpenAIEndpointBuilderFactory {
default OpenAIEndpointBuilder openai(String componentName, String
path) {
return OpenAIEndpointBuilderFactory.endpointBuilder(componentName,
path);
}
+ /**
+ * LLM (camel-openai)
+ * 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.
+ *
+ * Category: ai
+ * Since: 4.17
+ * Maven coordinates: org.apache.camel:camel-openai
+ *
+ * Syntax: <code>llm:operation</code>
+ *
+ * Path parameter: operation (required)
+ * The operation to perform: 'chat-completion', 'responses',
+ * 'responses-retrieve', 'responses-cancel', 'batch', 'batch-retrieve',
+ * 'batch-cancel', 'batch-results', 'embeddings', 'tool-execution',
+ * 'audio-transcription', 'audio-translation', 'audio-speech',
+ * 'moderation', 'image-generation', 'image-edit', or 'webhook' (a
+ * consumer)
+ * There are 17 enums and the value can be one of: chat-completion,
+ * responses, responses-retrieve, responses-cancel, batch,
+ * batch-retrieve, batch-cancel, batch-results, embeddings,
+ * tool-execution, audio-transcription, audio-translation,
audio-speech,
+ * moderation, image-generation, image-edit, webhook
+ *
+ * @param path operation
+ * @return the dsl builder
+ */
+ default OpenAIEndpointBuilder llm(String path) {
+ return OpenAIEndpointBuilderFactory.endpointBuilder("llm", path);
+ }
}
/**