litellm/tests/unit/llms/bedrock/chat/invoke_transformations
devin-ai-integration[bot] 5c24802fbd
fix(bedrock): send json_schema as a forced tool on Claude Opus 4.7 and 4.8 Converse (#42644)
* fix(bedrock): send json_schema as a forced tool on Claude Opus 4.7 and 4.8 Converse

Bedrock rejects outputConfig.textFormat on Opus 4.7 and 4.8 with
"output_config.format: Extra inputs are not permitted", and the AWS
model cards list structured outputs as not supported for both, so
their cost-map entries no longer claim supports_native_structured_output
and json_schema requests fall back to the json_tool_call tool.

Fixes #27846

* test(bedrock): assert Opus 4.7 and 4.8 inline the schema on Invoke, move the native case to Sonnet 4.6

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-09-22 20:09:21 -07:00
..
__init__.py test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
test_amazon_moonshot_transformation.py test(llms): migrate bedrock, baseten and base_llm batch tests to tests/unit 2026-09-20 07:51:50 +00:00
test_amazon_nova_transformation.py test(llms): migrate bedrock, baseten and base_llm batch tests to tests/unit 2026-09-20 07:51:50 +00:00
test_amazon_qwen2_transformation.py test(llms): migrate bedrock, baseten and base_llm batch tests to tests/unit 2026-09-20 07:51:50 +00:00
test_amazon_qwen3_transformation.py test(llms): migrate bedrock, baseten and base_llm batch tests to tests/unit 2026-09-20 07:51:50 +00:00
test_base_invoke_transformation.py test(llms): migrate bedrock, baseten and base_llm batch tests to tests/unit 2026-09-20 07:51:50 +00:00
test_bedrock_chat_invoke_transformations_anthropic_claude3_transformation.py fix(bedrock): send json_schema as a forced tool on Claude Opus 4.7 and 4.8 Converse (#42644) 2026-09-22 20:09:21 -07:00
test_twelvelabs_pegasus_transformation.py test(llms): migrate bedrock, baseten and base_llm batch tests to tests/unit 2026-09-20 07:51:50 +00:00