From 866a3edd08fea815bcb5b5f7d8909211df43fd04 Mon Sep 17 00:00:00 2001 From: Sameer Kankute Date: Wed, 20 May 2026 21:44:38 +0530 Subject: [PATCH] style(interactions): black-format gemini transformation.py Co-authored-by: Cursor --- litellm/llms/gemini/interactions/transformation.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/litellm/llms/gemini/interactions/transformation.py b/litellm/llms/gemini/interactions/transformation.py index 8271dd7c35e..b18b6a28ce4 100644 --- a/litellm/llms/gemini/interactions/transformation.py +++ b/litellm/llms/gemini/interactions/transformation.py @@ -186,9 +186,13 @@ class GoogleAIStudioInteractionsConfig(BaseInteractionsAPIConfig): response_format = optional_params.get("response_format") response_mime_type = optional_params.get("response_mime_type") - if response_mime_type and not isinstance(response_format, list) and ( - not isinstance(response_format, dict) - or "mime_type" not in response_format + if ( + response_mime_type + and not isinstance(response_format, list) + and ( + not isinstance(response_format, dict) + or "mime_type" not in response_format + ) ): # Wrap the legacy schema into the new polymorphic format. new_rf: Dict[str, Any] = {