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


##########
python/flink_agents/integrations/chat_models/tongyi_chat_model.py:
##########
@@ -35,6 +36,73 @@
 DEFAULT_REQUEST_TIMEOUT = 60.0
 DEFAULT_MODEL = "qwen-plus"
 
+# Models with documented json_schema support that are also served on the
+# text-generation endpoint this connection calls. That intersection is the
+# Qwen3.7-Max family: the other four json_schema families (Qwen3.7-Plus,
+# Qwen3.7-Flash, Qwen3.8-Flash, Qwen3.8-Max) route to the multimodal endpoint 
and
+# answer Generation.call with "url error".
+# json_schema model list and mode semantics:
+#   https://help.aliyun.com/zh/model-studio/json-mode
+# text- vs multimodal-interface routing:
+#   https://help.aliyun.com/zh/model-studio/text-generation
+#
+# Capability is documented per family, meaning the base name plus the dated
+# snapshots behind it, so a name matches the prefix itself or a name 
continuing it
+# after a "-" separator. That expresses the documented unit instead of a 
snapshot
+# census that goes stale, and it keeps out a different family that merely 
extends
+# the prefix, such as qwen3.7-maximum. The one snapshot the rule admits without
+# json_schema reaching it, qwen3.7-max-2026-06-08, is multimodal-routed and 
answers
+# this connection with "url error" whether or not a response_format rides 
along.
+#
+# A name outside the rule reports not-capable and degrades to the 
prompt-engineering
+# fallback rather than failing at the provider.
+_NATIVE_STRUCTURED_OUTPUT_ALIAS_PREFIXES = ("qwen3.7-max",)

Review Comment:
   `qwen3.7-max-2026-06-08` is incorrectly classified as supported by this 
prefix match. `TongyiChatModel` invokes `dashscope.Generation.call`, but the 
[Alibaba Cloud 
documentation](https://www.alibabacloud.com/help/en/model-studio/text-generation#dashscope-h4)
 states that this model uses the multimodal API and that directly substituting 
it into a text-generation request causes an error. Please replace the prefix 
match with an exact allowlist containing `qwen3.7-max`, `qwen3.7-max-preview`, 
`qwen3.7-max-2026-05-17`, and `qwen3.7-max-2026-05-20`.



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