wenjin272 commented on PR #1405: URL: https://github.com/apache/flink-agents/pull/1405#issuecomment-7099547074
I think the retry classification should live in the integration layer. Each integration understands its provider's errors, including SDK exceptions and business error codes. `ChatModelInvoker` could then consume a common retryability signal and handle the retry budget, backoff, and durable outcome. The current implementation adds quite a bit of provider-specific exception inspection to `ChatModelInvoker`: looking for different status getters, walking class hierarchies, and handling reflection accessibility. `PythonChatModelBridge` also feels indirect: it extracts an HTTP status in Python, creates a new Java exception carrying that status, and then lets the invoker read it through reflection again. Could we define a common provider-failure contract in the API layer and let integrations classify their errors? The cross-language bridge would preserve that classification, while unknown exceptions could keep the existing retry behavior. A shared HTTP classification helper could avoid duplication across integrations. -- 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]
