You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "wenjin272 (via GitHub)" <gi...@apache.org> on 2026/08/25 06:42:27 UTC

Re: [PR] [integrations][anthropic] Stop sending rejected sampling parameters [flink-agents]

wenjin272 commented on code in PR #1037:
URL: https://github.com/apache/flink-agents/pull/1037#discussion_r3850201918


##########
integrations/chat-models/anthropic/src/main/java/org/apache/flink/agents/integrations/chatmodels/anthropic/AnthropicChatModelConnection.java:
##########
@@ -366,15 +471,16 @@ BuiltRequest buildRequest(
         }
 
         Object temperature = modelParams.remove("temperature");
-        if (temperature instanceof Number) {
+        if (temperature instanceof Number
+                && sendSamplingParam(modelName, "temperature", temperature)) {

Review Comment:
   Thanks for fixing this! When both the top-level `temperature` and `additional_kwargs.temperature` are set, the latter should take precedence. However, the warning is emitted for the top-level value first and may report the overridden value. Could we resolve the effective temperature before filtering/logging and add a test for this case?



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org