diff --git a/litellm/llms/vertex_ai/gemini/transformation.py b/litellm/llms/vertex_ai/gemini/transformation.py index e2d62be6a69..84a70ee3bae 100644 --- a/litellm/llms/vertex_ai/gemini/transformation.py +++ b/litellm/llms/vertex_ai/gemini/transformation.py @@ -613,11 +613,13 @@ def _get_equivalent_key(key: str, available_keys: set) -> str | None: return None -def check_if_part_exists_in_parts(parts: list[PartType], part: PartType, excluded_keys: list[str] = []) -> bool: +def check_if_part_exists_in_parts(parts: list[PartType], part: PartType, excluded_keys: list[str] | None = None) -> bool: """ Check if a part exists in a list of parts Handles both camelCase and snake_case key variations (e.g., function_call vs functionCall) """ + if excluded_keys is None: + excluded_keys = [] keys_to_compare: Final = set(part.keys()) - set(excluded_keys) for p in parts: p_keys = set(p.keys())