fix(vertex_ai): satisfy recursion and type discipline gates for oneOf helper

This commit is contained in:
WaleedH 2026-08-05 16:55:36 +03:00
parent 72283e7f87
commit aae2d8b66c
2 changed files with 2 additions and 1 deletions

View file

@ -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)

View file

@ -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",