fix(bedrock_mantle): satisfy LIT002 gate for reasoning summary handler

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
shivam 2026-09-11 23:47:00 +00:00
parent eb2ce87cb3
commit f5c298a816

View file

@ -214,11 +214,15 @@ class BedrockMantleResponsesAPIConfig(BedrockMantleAuthMixin, OpenAIResponsesAPI
summary,
sorted(_BEDROCK_MANTLE_OPENAI_PATH_SUPPORTED_REASONING_SUMMARIES),
)
stripped: Final = {key: value for key, value in reasoning.items() if key != "summary"}
stripped: Final = { # mutable-ok: map_openai_params contract returns a plain dict
key: value for key, value in reasoning.items() if key != "summary"
}
return (
{**params, "reasoning": stripped}
{**params, "reasoning": stripped} # mutable-ok: map_openai_params contract returns a plain dict
if stripped
else {key: value for key, value in params.items() if key != "reasoning"}
else { # mutable-ok: map_openai_params contract returns a plain dict
key: value for key, value in params.items() if key != "reasoning"
}
)
def transform_responses_api_request(