This commit is contained in:
L 2026-08-27 19:28:10 -05:00 • committed by GitHub
commit 7e44cb2dfc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 27 additions and 0 deletions

View file

@ -12560,6 +12560,7 @@
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_native_structured_output": true,
"supports_sampling_params": false,
"supports_tool_choice": true,
"supports_vision": true,

View file

@ -12560,6 +12560,7 @@
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_native_structured_output": true,
"supports_sampling_params": false,
"supports_tool_choice": true,
"supports_vision": true,

View file

@ -1338,6 +1338,31 @@ def test_native_structured_output_uses_bundled_capability_when_remote_map_lags(
assert "tools" not in optional_params
def test_claude_sonnet_5_uses_native_structured_output() -> None:
optional_params = AnthropicConfig().map_openai_params(
non_default_params={
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "answer",
"schema": {
"type": "object",
"properties": {"answer": {"type": "string"}},
"required": ["answer"],
},
},
}
},
optional_params={},
model="claude-sonnet-5",
drop_params=False,
)
assert "output_format" in optional_params
assert "tools" not in optional_params
assert "tool_choice" not in optional_params
def test_non_structured_output_model_uses_tool_workaround():
"""
Test that models NOT in the native structured output list still use the