wenjin272 commented on code in PR #1097:
URL: https://github.com/apache/flink-agents/pull/1097#discussion_r4011393029
##########
integrations/chat-models/bedrock/src/main/java/org/apache/flink/agents/integrations/chatmodels/bedrock/BedrockChatModelConnection.java:
##########
@@ -88,6 +104,80 @@
public class BedrockChatModelConnection extends BaseChatModelConnection {
private static final ObjectMapper MAPPER = new ObjectMapper();
+
+ // Models AWS documents structured-output support for on the
bedrock-runtime endpoint. There is
+ // no single list page: the feature page delegates the per-model answer to
the individual model
+ // cards, where each card carries it as a "Structured outputs" bullet in
the Supported or Not
+ // Supported column of its "Features supported using bedrock-runtime
endpoint" table.
+ //
+ // The ids are the Model ID column of each card's Programmatic Access
table, read from the
+ // bedrock-runtime row. A card commonly prints a different id for
bedrock-mantle and can carry
+ // opposite verdicts for the two, so the endpoint an id was read from is
part of what makes the
+ // entry correct. This connection calls Converse on bedrock-runtime.
+ //
+ // Matching is exact, never by prefix. A Bedrock id already pins the
vendor, the snapshot date
+ // and the version in one string, so there is no alias for a prefix to
cover, and a prefix would
+ // over-capture: "qwen.qwen3" admits qwen.qwen3-vl-235b-a22b, which AWS
documents as not
+ // supported, and "anthropic.claude-sonnet-4" admits
anthropic.claude-sonnet-4-20250514-v1:0,
+ // whose card carries no answer at all. Exact matching also keeps
irregular id shapes correct
+ // with no normalisation rule: mistral.mistral-large-3-675b-instruct
carries no version suffix,
+ // openai.gpt-oss-120b-1:0 carries "-1:0" rather than "-v1:0".
+ //
+ // A card whose capability table carries the bullet in neither column is
undocumented rather
+ // than negative, and is absent from this set for that reason.
+ private static final Set<String> NATIVE_STRUCTURED_OUTPUT_MODELS =
+ Set.of(
+ "anthropic.claude-sonnet-4-5-20250929-v1:0",
+ "anthropic.claude-opus-4-5-20251101-v1:0",
+ "anthropic.claude-haiku-4-5-20251001-v1:0",
+ "anthropic.claude-opus-4-6-v1",
+ "anthropic.claude-sonnet-4-6",
+ "deepseek.v3-v1:0",
+ "deepseek.v3.2",
+ "google.gemma-3-12b-it",
+ "google.gemma-3-27b-it",
+ "minimax.minimax-m2",
+ "minimax.minimax-m2.1",
+ "minimax.minimax-m2.5",
+ "mistral.mistral-large-3-675b-instruct",
+ "mistral.devstral-2-123b",
+ "mistral.magistral-small-2509",
+ "mistral.ministral-3-14b-instruct",
+ "mistral.ministral-3-3b-instruct",
+ "mistral.ministral-3-8b-instruct",
+ "mistral.voxtral-mini-3b-2507",
+ "mistral.voxtral-small-24b-2507",
+ "moonshot.kimi-k2-thinking",
+ "moonshotai.kimi-k2.5",
+ "nvidia.nemotron-nano-12b-v2",
+ "nvidia.nemotron-nano-3-30b",
+ "nvidia.nemotron-nano-9b-v2",
+ "nvidia.nemotron-super-3-120b",
+ "openai.gpt-oss-120b-1:0",
+ "openai.gpt-oss-20b-1:0",
+ "openai.gpt-5.6-luna",
Review Comment:
AWS documents Structured outputs as unsupported for GPT-5.6 Luna on
`bedrock-runtime`. Could we remove it from the allowlist? Otherwise its `us.`
and `global.` inference-profile IDs also incorrectly take the native path.
Reference:
https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-56-luna.html
--
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]