diff --git a/litellm/llms/bedrock_mantle/responses/transformation.py b/litellm/llms/bedrock_mantle/responses/transformation.py index 4710577aea0..53a3e634adf 100644 --- a/litellm/llms/bedrock_mantle/responses/transformation.py +++ b/litellm/llms/bedrock_mantle/responses/transformation.py @@ -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(