wenjin272 commented on code in PR #1186:
URL: https://github.com/apache/flink-agents/pull/1186#discussion_r4185554848
##########
integrations/chat-models/watsonx/src/main/java/org/apache/flink/agents/integrations/chatmodels/watsonx/WatsonxChatModelConnection.java:
##########
@@ -284,6 +285,8 @@ public ChatMessage chat(
List<Tool> tools,
Map<String, Object> modelParams,
Object outputSchema) {
+ // Media blocks are not sent yet; fail rather than drop them (#1059).
+ UnsupportedContentBlockException.rejectMedia("IBM watsonx.ai",
messages);
Review Comment:
The media check only runs in the four-argument `chat()`, but
`BaseChatModelSetup.chat()` calls the three-argument overload, which delegates
directly to `doChat()`. That path still silently drops media via `getText()`
and sends only the text.
Could we delegate the three-argument overload to the four-argument one and
add a regression test for that entry point? I reproduced this with a local HTTP
endpoint: a text-plus-image message was sent as text only without throwing.
--
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]