[Fix] Add max_depth guard to BFL _read_image_bytes recursive function

Use the standard depth/max_depth pattern with DEFAULT_MAX_RECURSE_DEPTH
to guard the recursive list-unwrapping in _read_image_bytes, matching
the existing pattern used by _read_all_bytes in vertex_imagen.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
yuneng-jiang
2026-03-12 13:22:56 -07:00
co-authored by Claude Opus 4.6
parent 553cfc6d72
commit a93c069dd5
2 changed files with 15 additions and 8 deletions
@@ -44,6 +44,7 @@ IGNORE_FUNCTIONS = [
"extract_text_from_a2a_message", # max depth set (default 10) to prevent infinite recursion in A2A message parsing.
"_convert_to_json_serializable_dict", # max depth set (default 20) and circular reference protection to prevent infinite recursion.
"dict", # max depth set. _LiteLLMParamsDictView.dict() calls builtin dict(), not itself.
"_read_image_bytes", # max depth set.
]