diff --git a/tests/llm_translation/test_bedrock_gpt_oss.py b/tests/llm_translation/test_bedrock_gpt_oss.py index 455c5c62b5..c21db7c772 100644 --- a/tests/llm_translation/test_bedrock_gpt_oss.py +++ b/tests/llm_translation/test_bedrock_gpt_oss.py @@ -16,11 +16,16 @@ class TestBedrockGPTOSS(BaseLLMChatTest): return { "model": "bedrock/converse/openai.gpt-oss-20b-1:0", } - + def test_tool_call_no_arguments(self, tool_call_no_arguments): """Test that tool calls with no arguments is translated correctly. Relevant issue: https://github.com/BerriAI/litellm/issues/6833""" pass + @pytest.mark.flaky(retries=6, delay=5) + def test_function_calling_with_tool_response(self): + """Bedrock GPT-OSS intermittently streams truncated toolUse.input deltas, producing malformed JSON args. Retry to tolerate model flakiness.""" + super().test_function_calling_with_tool_response() + def test_prompt_caching(self): """ Remove override once we have access to Bedrock prompt caching @@ -33,10 +38,13 @@ class TestBedrockGPTOSS(BaseLLMChatTest): """ pass - @pytest.mark.parametrize("model", [ - "bedrock/openai.gpt-oss-20b-1:0", - "bedrock/openai.gpt-oss-120b-1:0", - ]) + @pytest.mark.parametrize( + "model", + [ + "bedrock/openai.gpt-oss-20b-1:0", + "bedrock/openai.gpt-oss-120b-1:0", + ], + ) def test_reasoning_effort_transformation_gpt_oss(self, model): """Test that reasoning_effort is handled correctly for GPT-OSS models.""" config = AmazonConverseConfig() @@ -51,7 +59,7 @@ class TestBedrockGPTOSS(BaseLLMChatTest): model=model, drop_params=False, ) - + # GPT-OSS should have reasoning_effort in result, not thinking assert "reasoning_effort" in result assert result["reasoning_effort"] == "low"