cold-soccer-35030
03/26/2025, 7:17 AMmax_nested_fnc_calls
?tall-airline-16756
03/26/2025, 7:17 AMtall-airline-16756
03/26/2025, 7:17 AMmax_nested_fnc_calls
parameter is used to limit the depth of nested function calls. When the nesting depth reaches or exceeds this value, the function context is dropped (set to None) to prevent further nesting, unless persistent functions are required. This helps prevent issues like infinite recursion or excessive resource usage.
Sources: livekit.agents.pipeline API documentationcold-soccer-35030
03/26/2025, 7:18 AMtall-airline-16756
03/26/2025, 7:18 AMmax_nested_fnc_calls
parameter prevents this by dropping the function context once the nesting depth reaches or exceeds the configured value, ensuring the loop is broken.
Sources: livekit.agents.pipeline API documentationcold-soccer-35030
03/26/2025, 7:19 AMtall-airline-16756
03/26/2025, 7:19 AMmax_nested_fnc_calls
, including scenarios with tool_call
. However, the mechanism is designed to prevent such loops by limiting the depth of nested function calls, which could theoretically occur if a tool or function repeatedly invokes itself or other functions without a termination condition.