mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-05 07:37:50 +00:00
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:
parent
2e6d8bff5b
commit
2b3cde3526
1 changed files with 2 additions and 1 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue