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.
This commit is contained in:
Mrun25 2026-10-22 21:28:10 +05:30
parent 2e6d8bff5b
commit 2b3cde3526

View file

@ -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(