Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(bedrock): enable native structured output for GLM 5 and DeepSeek V3.2 (#35669)

Alex Shtof280c95ccb064
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json
index d954e33da9c..61f916b1418 100644
--- a/litellm/model_prices_and_context_window_backup.json
+++ b/litellm/model_prices_and_context_window_backup.json
@@ -15471,6 +15471,7 @@
"output_cost_per_token": 1.85e-06,
"supports_function_calling": true,
"supports_reasoning": true,
+ "supports_native_structured_output": true,
"supports_tool_choice": true,
"source": "https://aws.amazon.com/bedrock/pricing/"
},
@@ -40240,6 +40241,7 @@
"mode": "chat",
"supports_function_calling": true,
"supports_reasoning": true,
+ "supports_native_structured_output": true,
"supports_system_messages": true,
"supports_tool_choice": true,
"source": "https://aws.amazon.com/bedrock/pricing/"
diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json
index 8982b4f2565..ebfba7574cb 100644
--- a/model_prices_and_context_window.json
+++ b/model_prices_and_context_window.json
@@ -15471,6 +15471,7 @@
"output_cost_per_token": 1.85e-06,
"supports_function_calling": true,
"supports_reasoning": true,
+ "supports_native_structured_output": true,
"supports_tool_choice": true,
"source": "https://aws.amazon.com/bedrock/pricing/"
},
@@ -40331,6 +40332,7 @@
"mode": "chat",
"supports_function_calling": true,
"supports_reasoning": true,
+ "supports_native_structured_output": true,
"supports_system_messages": true,
"supports_tool_choice": true,
"source": "https://aws.amazon.com/bedrock/pricing/"
diff --git a/tests/test_litellm/llms/bedrock/chat/test_converse_transformation.py b/tests/test_litellm/llms/bedrock/chat/test_converse_transformation.py
index 6d318bb8729..7b7796fb01b 100644
--- a/tests/test_litellm/llms/bedrock/chat/test_converse_transformation.py
+++ b/tests/test_litellm/llms/bedrock/chat/test_converse_transformation.py
@@ -3562,6 +3562,8 @@ def test_supports_native_structured_outputs():
assert config._supports_native_structured_outputs("nvidia.nemotron-nano-3-30b")
# DeepSeek: old substring "deepseek-v3.1" didn't match real ID
assert config._supports_native_structured_outputs("deepseek.v3-v1:0")
+ assert config._supports_native_structured_outputs("deepseek.v3.2")
+ assert config._supports_native_structured_outputs("zai.glm-5")
# Unsupported models -- should fall back to tool-call approach
assert not config._supports_native_structured_outputs(