[
https://issues.apache.org/jira/browse/CAMEL-23500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18084222#comment-18084222
]
Karol Krawczyk commented on CAMEL-23500:
----------------------------------------
I'd like to work on this. [PR|https://github.com/apache/camel/pull/23614]
Added an "OpenAI-Compatible Providers" docs section covering baseUrl
configuration for OpenRouter,
Ollama, LM Studio, and vLLM, plus OpenRouter cross-provider model identifiers
and provider
routing/fallbacks via additionalBodyProperty.
One correction to the ticket: setting OpenRouter's HTTP-Referer / X-Title
attribution headers "via
exchange headers" isn't possible today — the component doesn't expose custom
HTTP request headers (the
client only sets apiKey/baseUrl/SSL and the producer calls .create(params)
without RequestOptions). I
documented this as a current limitation. I think it's worth a small follow-up
to add a custom
request-header option (e.g. additionalRequestHeader.), which openai-java
supports via
RequestOptions.putHeader — I can open a separate ticket and take it.
On the OpenRouter kamelet idea: since baseUrl makes it a one-line
configuration, a dedicated kamelet
seems low-value, so I left it out.
I don't have permission to self-assign — could a committer please assign this
to me ?
> Document camel-openai usage with OpenAI-compatible providers (OpenRouter)
> -------------------------------------------------------------------------
>
> Key: CAMEL-23500
> URL: https://issues.apache.org/jira/browse/CAMEL-23500
> Project: Camel
> Issue Type: Task
> Components: camel-openai
> Reporter: Federico Mariani
> Priority: Minor
>
> The camel-openai component supports any OpenAI-compatible API via the baseUrl
> parameter, but the documentation doesn't show how to use it with popular
> third-party providers like OpenRouter, Ollama, or LM Studio.
> We should add a section to the *openai-component.adoc* docs with
> configuration examples for common providers. This would help users discover
> that a separate component is not needed and show how to use provider-specific
> features through existing escape hatches (additionalBodyProperty, exchange
> headers).
> Example providers to cover:
> - *OpenRouter* (https://openrouter.ai/api/v1) — multi-model gateway with
> provider routing and fallbacks
> - *Ollama* (http://localhost:11434/v1) — local LLM server
> - *LM Studio* (http://localhost:1234/v1) — local model runner
> - *vLLM* (http://localhost:8000/v1) — high-throughput LLM serving engine with
> OpenAI-compatible API
> For OpenRouter specifically, document how to:
> - Set attribution headers (HTTP-Referer, X-Title) via exchange headers
> - Configure provider routing preferences via _additionalBodyProperty_
> - Use cross-provider model identifiers (e.g.,
> anthropic/claude-sonnet-4-20250514)
> Evaluate if an openrouter kamelet would make sense.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)