diff --git a/litellm/llms/chatgpt/responses/transformation.py b/litellm/llms/chatgpt/responses/transformation.py index 4eb33a331b4..56f26e288eb 100644 --- a/litellm/llms/chatgpt/responses/transformation.py +++ b/litellm/llms/chatgpt/responses/transformation.py @@ -77,11 +77,12 @@ class ChatGPTResponsesAPIConfig(OpenAIResponsesAPIConfig): litellm_params: GenericLiteLLMParams, headers: dict, ) -> dict: - if isinstance(input, str): - input = [{"role": "user", "content": input}] + normalized_input: Final[str | ResponseInputParam] = ( + [{"role": "user", "content": input}] if isinstance(input, str) else input + ) request: Final = super().transform_responses_api_request( model, - input, + normalized_input, response_api_optional_request_params, litellm_params, headers,