k-krawczyk opened a new pull request, #23614:
URL: https://github.com/apache/camel/pull/23614

   ## Summary
   
   Adds an "OpenAI-Compatible Providers" section to the OpenAI component 
documentation, with `baseUrl`-based configuration examples for OpenRouter, 
Ollama, LM Studio, and vLLM. This makes it discoverable that no separate 
component is needed to use third-party gateways or local model servers.
   
   ## Changes
   
   - New `== OpenAI-Compatible Providers` section in `openai-component.adoc`:
     - Provider → `baseUrl` reference table (OpenAI, OpenRouter, Ollama, LM 
Studio, vLLM)
     - Per-provider examples (Ollama, LM Studio, vLLM)
     - OpenRouter: cross-provider model identifiers and provider 
routing/fallbacks via `additionalBodyProperty` (a JSON body value)
   
   Docs-only; no code changes. The `docs/components/.../openai-component.adoc` 
page is a symlink to the component source, so only the source file changes.
   
   ## On the OpenRouter attribution headers
   
   The ticket also asked to document setting OpenRouter's `HTTP-Referer` / 
`X-Title` attribution headers via exchange headers. After checking the code, 
the component does not currently expose a way to set custom HTTP request 
headers: the client is built with only `apiKey`/`baseUrl`/SSL and the producer 
calls `.create(params)` without `RequestOptions`. So I documented this as a 
current limitation rather than referencing a non-existent option. I'd suggest a 
small follow-up enhancement to add a custom request-header option (e.g. 
`additionalRequestHeader.`), which the `openai-java` SDK supports via 
`RequestOptions.putHeader` — happy to take that on.
   
   ## On a dedicated OpenRouter kamelet
   
   The ticket asked to evaluate one. Given `baseUrl` reduces OpenRouter to a 
one-line configuration, a dedicated kamelet adds little value over the 
documented approach, so I'd lean against it.
   
   _Reported by Claude Code on behalf of Karol Krawczyk_


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