[
https://issues.apache.org/jira/browse/CAMEL-24339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18101654#comment-18101654
]
Claus Ibsen commented on CAMEL-24339:
-------------------------------------
Yes, both camel.component.llm.xxx and camel.component.openai.xxx would work.
Here's how:
Runtime property configuration:
- camel.component.llm.apiKey=xxx — creates an OpenAIComponent instance
registered under the llm scheme, configures it
- camel.component.openai.apiKey=yyy — creates a separate OpenAIComponent
instance registered under the openai scheme, configures it
- This is the same pattern as camel.component.smtp.host=... vs
camel.component.imap.host=... in camel-mail — separate instances of the same
class, independently configured
Configurer resolution: The configurer is generated only for the first scheme.
With @Component("llm,openai"), a llm-component configurer is generated. Both
instances use it because
DefaultComponent.doBuild() always extracts the first scheme from the
@Component annotation (line 374 in DefaultComponent.java: name =
StringHelper.before(name, ",")).
Tooling metadata: Each scheme gets its own catalog JSON (llm.json and
openai.json), its own component service file, and its own URI factory entry. So
IDEs, the Camel catalog, and the Camel MCP
tools would all show both llm and openai as available components with full
property documentation.
The one caveat: if a user sets properties on both camel.component.llm.xxx and
camel.component.openai.xxx, they get two independent component instances —
which is actually fine and arguably
useful (e.g., llm pointing to a local Ollama, openai pointing to OpenAI's
API).
> camel-openai - Can the name be updated to better hint it works for many
> vendor LLMs
> -----------------------------------------------------------------------------------
>
> Key: CAMEL-24339
> URL: https://issues.apache.org/jira/browse/CAMEL-24339
> Project: Camel
> Issue Type: Task
> Components: camel-ai
> Reporter: Claus Ibsen
> Priority: Major
> Fix For: 4.22.0
>
>
> The openai is making people think its for this vendor only. But its openai
> compatible, which a lot of LLMs are today, so you can use it with many.
>
> Before the LTS release we have a chance to do a last minute rename if we can
> come up with a better name.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)