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]

add test

eycjur58cf72ef5e15
diff --git a/tests/llm_translation/test_bedrock_gpt_oss.py b/tests/llm_translation/test_bedrock_gpt_oss.py
index 61bce04e2d0..9487abfbc77 100644
--- a/tests/llm_translation/test_bedrock_gpt_oss.py
+++ b/tests/llm_translation/test_bedrock_gpt_oss.py
@@ -2,11 +2,13 @@ from base_llm_unit_tests import BaseLLMChatTest
import pytest
import sys
import os
+from unittest.mock import patch, MagicMock
sys.path.insert(
0, os.path.abspath("../..")
) # Adds the parent directory to the system path
import litellm
+from litellm.llms.bedrock.chat.converse_transformation import AmazonConverseConfig
class TestBedrockGPTOSS(BaseLLMChatTest):
@@ -25,3 +27,27 @@ class TestBedrockGPTOSS(BaseLLMChatTest):
Remove override once we have access to Bedrock prompt caching
"""
pass
+
+ @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()
+
+ # Test GPT-OSS model - should keep reasoning_effort as-is
+ non_default_params = {"reasoning_effort": "low"}
+ optional_params = {}
+
+ result = config.map_openai_params(
+ non_default_params=non_default_params,
+ optional_params=optional_params,
+ 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"
+ assert "thinking" not in result