From 398ed330f15fa3d745a2790e2e8510e9017b860d Mon Sep 17 00:00:00 2001 From: gegemeimingzi <200456873+gegemeimingzi@users.noreply.github.com> Date: Wed, 19 Aug 2026 22:50:39 +0800 Subject: [PATCH] style(vertex): apply ruff format to the 3.7-flash thinking fix --- .../gemini/vertex_and_google_ai_studio_gemini.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py b/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py index 1e98a53da83..b3281cb2a38 100644 --- a/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py +++ b/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py @@ -281,11 +281,7 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig): HIGH for it, while earlier 3.x-flash models (3.0, 3.1, 3.5, 3.6) still accept it. """ lowered: Final = model.lower() - return ( - "flash" in lowered - and "gemini-3" in lowered - and "gemini-3.7" not in lowered - ) + return "flash" in lowered and "gemini-3" in lowered and "gemini-3.7" not in lowered @staticmethod def _forward_gemini_function_call_id(model: str) -> bool: @@ -967,9 +963,7 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig): # Follow provider defaults unless explicitly opted into legacy behavior. if litellm.enable_gemini_default_thinking_level_low is True: params["thinkingLevel"] = ( - "minimal" - if VertexGeminiConfig._is_gemini3_flash_supports_minimal(model) - else "low" + "minimal" if VertexGeminiConfig._is_gemini3_flash_supports_minimal(model) else "low" ) else: # Thinking disabled