Configuration¶
Recursion Depth Management¶
- xgrammar.get_max_recursion_depth() int [source]¶
Get the maximum allowed recursion depth. The depth is shared per process.
The maximum recursion depth is determined in the following order:
Manually set via
set_max_recursion_depth()
XGRAMMAR_MAX_RECURSION_DEPTH
environment variable (if set and is a valid integer <= 1,000,000)Default value of 10,000
- Returns:
max_recursion_depth – The maximum allowed recursion depth.
- Return type: