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

   `GoogleVertexAIConfiguration` declares two options that no code ever read:
   
   ```java
   @UriParam(label = "producer", description = "Streaming output mode: complete 
(default) or chunks",
             defaultValue = "complete", enums = "complete,chunks")
   private String streamOutputMode = "complete";
   
   @UriParam(label = "producer", description = "Whether to use JSON 
request/response format", defaultValue = "false")
   private boolean jsonMode;
   ```
   
   They are documented and exposed in the catalog, so `streamOutputMode=chunks` 
looked configurable
   while `generateChatStreaming` always concatenated the whole response, and 
`jsonMode` did nothing at
   all. The `CamelGoogleVertexAIStreamOutputMode` header constant was equally 
unread.
   
   * `streamOutputMode=chunks` now produces a `List<String>` with one element 
per streamed chunk, ready
     for a `split()`. The default `complete` keeps returning the concatenated 
`String`, so routes that
     do not set the option are unaffected. The header now works too and takes 
precedence over the
     endpoint option.
   * `jsonMode=true` sets the request's response MIME type to 
`application/json`.
   
   Both are covered by an upgrade-guide entry, since an option that starts 
being honoured is a
   behaviour change for anyone who had set it.
   
   Two smaller items from the same audit:
   
   * `generateChat` and `generateCode` delegate verbatim to `generateText` 
while being advertised as
     distinct operations. They are now documented as aliases in the enum 
javadoc — no behaviour change.
   * `buildRawPredictRequestBody` called `body.getClass()` on its failure path, 
so a message with no
     body failed with a `NullPointerException` instead of the intended "must be 
a JSON String, Map, or
     plain text prompt" message.
   
   _Claude Code on behalf of oscerd_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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