From 9c6dc3c47a28756d1c0d613c504b89800566cfd1 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 6 Sep 2025 12:04:20 -0700 Subject: [PATCH] fix(converse_transformation.py): correctly transform reasoning_effort for gpt-oss models --- litellm/llms/bedrock/chat/converse_transformation.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/litellm/llms/bedrock/chat/converse_transformation.py b/litellm/llms/bedrock/chat/converse_transformation.py index e06f92a8380..06b2098fe38 100644 --- a/litellm/llms/bedrock/chat/converse_transformation.py +++ b/litellm/llms/bedrock/chat/converse_transformation.py @@ -473,12 +473,12 @@ class AmazonConverseConfig(BaseConfig): if "gpt-oss" in model: # GPT-OSS models: keep reasoning_effort as-is # It will be passed through to additionalModelRequestFields - continue - - # Anthropic and other models: convert to thinking parameter - optional_params["thinking"] = AnthropicConfig._map_reasoning_effort( - value - ) + optional_params["reasoning_effort"] = value + else: + # Anthropic and other models: convert to thinking parameter + optional_params["thinking"] = AnthropicConfig._map_reasoning_effort( + value + ) # Only update thinking tokens for non-GPT-OSS models if "gpt-oss" not in model: