diff --git a/litellm/llms/vertex_ai/common_utils.py b/litellm/llms/vertex_ai/common_utils.py index c731ced1263..560810f3486 100644 --- a/litellm/llms/vertex_ai/common_utils.py +++ b/litellm/llms/vertex_ai/common_utils.py @@ -820,7 +820,7 @@ def convert_anyof_null_to_nullable(schema, depth=0): anyof: Final = schema.get("anyOf", None) if anyof is not None: contains_null = False - for atype in list(anyof): + for atype in tuple(anyof): if isinstance(atype, dict) and atype.get("type") == "null": # remove null type anyof.remove(atype) diff --git a/tests/code_coverage_tests/recursive_detector.py b/tests/code_coverage_tests/recursive_detector.py index 244e17b46a1..9c871b54802 100644 --- a/tests/code_coverage_tests/recursive_detector.py +++ b/tests/code_coverage_tests/recursive_detector.py @@ -11,6 +11,7 @@ IGNORE_FUNCTIONS = [ "clean_message", "unpack_defs", "convert_anyof_null_to_nullable", # has a set max depth + "_convert_oneof_to_anyof", # has a set max depth "add_object_type", "strip_field", "_transform_prompt",