oscerd opened a new pull request, #26003:
URL: https://github.com/apache/camel/pull/26003

   ## Issue
   [CAMEL-24536](https://issues.apache.org/jira/browse/CAMEL-24536)
   
   ## Problem
   `OpenAiEmbeddingModelBuilder.build()` configures the model with:
   
   ```java
   .logRequests(logRequests)
   .logRequests(logResponses)   // <-- wrong setter
   ```
   
   The second call re-sets `logRequests` using the `logResponses` flag instead 
of calling
   `.logResponses(logResponses)`. So the `logResponses` option is never applied 
(response logging can't be
   turned on) and `logRequests` is silently overwritten by the `logResponses` 
value. Both fields and their
   setters exist on the builder (lines 30-31, 58-66).
   
   ## Fix
   Call `.logResponses(logResponses)`.
   
   ## Testing
   No unit test is added: the fix is a one-line correction of an 
obviously-wrong setter, and the resulting
   flag is stored inside langchain4j's internal `OpenAiClient` (not exposed on 
the built `OpenAiEmbeddingModel`),
   so it is not observable without fragile deep reflection into a third-party 
type. The change compiles and
   `mvn -Psourcecheck validate` is green.
   
   _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]

Reply via email to