Copilot commented on code in PR #814:
URL: 
https://github.com/apache/rocketmq-dashboard/pull/814#discussion_r3702341437


##########
server/src/main/java/org/apache/rocketmq/studio/ops/ai/LlmConfigService.java:
##########
@@ -92,6 +92,8 @@ public synchronized void saveConfig(LlmConfigVO config) {
                 .apiKey(normalized.getApiKey())
                 .model(normalized.getModel())
                 .baseUrl(normalized.getApiBase())
+                .maxTokens(normalized.getMaxTokens())
+                .temperature(normalized.getTemperature())

Review Comment:
   Because `LlmConfigVO.temperature` is a primitive `double`, an incoming JSON 
payload that omits `temperature` will be deserialized as `0.0`. With this 
change persisting `temperature` into `GeneralSettingsVO`, such a request will 
silently overwrite the stored/default temperature with `0.0` (which passes 
validation and is indistinguishable from an explicit 0.0). If 
backward-compatible partial updates are expected, consider changing 
`temperature` (and optionally `maxTokens`) in `LlmConfigVO` to boxed types so 
you can detect “missing” and apply `DEFAULT_TEMPERATURE`/keep existing stored 
values before persisting.



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