Skip to main content

MAX_FALLBACK_DEPTH

Constant MAX_FALLBACK_DEPTH 

Source
pub const MAX_FALLBACK_DEPTH: usize = 3;
Expand description

Hard ceiling on providers.models.<alias>.fallback chain depth. The cycle guard only bounds chains that loop; a long acyclic chain would otherwise recurse one stack frame per alias at config-load and build time, turning a pathological config into a startup stack overflow. Both the validation walk and the runtime build walk stop descending past this depth and prune the rest of the branch.