From 2b3cde3526aa8ce38cb42377e5bb3793bdbba7f9 Mon Sep 17 00:00:00 2001 From: Mrun25 <165297479+Mrun25@users.noreply.github.com> Date: Thu, 22 Oct 2026 21:28:10 +0530 Subject: [PATCH] fix(bedrock): skip output_config effort lookup for reasoning_effort "none" Bedrock's converse handler has its own copy of the adaptive-effort lookup; with reasoning_effort="none" now mapping to thinking disabled for Claude 5-gen models, that path raised Invalid reasoning_effort. Guard it the same way as the anthropic path. --- litellm/llms/bedrock/chat/converse_transformation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litellm/llms/bedrock/chat/converse_transformation.py b/litellm/llms/bedrock/chat/converse_transformation.py index cd3727401ef..b6b455d9e30 100644 --- a/litellm/llms/bedrock/chat/converse_transformation.py +++ b/litellm/llms/bedrock/chat/converse_transformation.py @@ -542,7 +542,8 @@ class AmazonConverseConfig(BaseConfig): optional_params.pop("output_config", None) else: optional_params["thinking"] = mapped_thinking - if AnthropicConfig.is_adaptive_thinking_model(model, "bedrock"): + # "none" disables thinking outright; there is no matching output_config effort. + if reasoning_effort != "none" and AnthropicConfig.is_adaptive_thinking_model(model, "bedrock"): mapped_effort = REASONING_EFFORT_TO_OUTPUT_CONFIG_EFFORT.get(reasoning_effort) if mapped_effort is None: AnthropicConfig.raise_invalid_reasoning_effort(