mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
fix(sap): drop recursion from cache_control detection
This commit is contained in:
parent
a89894092c
commit
322593b725
1 changed files with 1 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ def _has_cache_control(v: str | dict | list) -> bool:
|
|||
if isinstance(v, dict):
|
||||
return v.get("cache_control") is not None
|
||||
if isinstance(v, list):
|
||||
return any(_has_cache_control(item) for item in v)
|
||||
return any(isinstance(item, dict) and item.get("cache_control") is not None for item in v)
|
||||
return False
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue