oscerd opened a new pull request, #25787: URL: https://github.com/apache/camel/pull/25787
# CAMEL-24519 / CAMEL-24520: two camel-ibm-watsonx-ai fixes ## CAMEL-24519 — the ModelId header is an output, not an input The `CamelIbmWatsonxAiModelId` header was documented as _"The model ID to use"_, implying a per-exchange input that selects the model. In practice the model is fixed at service-creation time from the `modelId` option, and the header is only ever **written to the response** (the embedding/rerank/forecast/deployment/tokenization handlers set it to `response.modelId()`) to report the model that was used. The `@Metadata` description is relabelled to reflect that it reports the model used (label `producer`). ## CAMEL-24520 — the lazy service getters are not thread-safe `WatsonxAiEndpoint` builds each watsonx.ai service lazily in its getter (`if (chatService == null) chatService = ...`). The lazy creation is intentional (avoid building clients an endpoint never uses), but was not synchronized, so two threads calling a getter concurrently on first use could both build a client, leaking one. The getters are now `synchronized`, keeping the lazy creation. ## Testing Verified with a full-reactor build — the header metadata change regenerates the component/catalog/endpoint-DSL descriptors, which are committed. The getters change is thread-safety only. --- _Claude Code on behalf of oscerd_ -- 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]
