fix(converse_transformation.py): correctly transform reasoning_effort for gpt-oss models

This commit is contained in:
Krrish Dholakia 2025-09-06 12:04:20 -07:00
parent e9415e3708
commit 9c6dc3c47a

View file

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