Zhuoxi2000 commented on code in PR #1405:
URL: https://github.com/apache/flink-agents/pull/1405#discussion_r4600639993


##########
integrations/chat-models/watsonx/src/main/java/org/apache/flink/agents/integrations/chatmodels/watsonx/WatsonxChatModelConnection.java:
##########
@@ -881,4 +887,19 @@ private synchronized void invalidateCachedIamToken(String 
rejectedToken) {
             iamTokenExpirationEpochSec = 0;
         }
     }
+
+    /** HTTP status kept on the exception so the chat retry loop can tell 4xx 
from 5xx. */
+    private static final class HttpStatusException extends RuntimeException {

Review Comment:
   Private HttpStatusException makes ChatModelInvoker's reflective statusCode() 
call fail. IllegalAccessException is swallowed, so isRetryableProviderFailure 
returns true for 400. The test passes only because it shares the package.



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