Skip to main content

ContextLimitsResolver

Type Alias ContextLimitsResolver 

pub type ContextLimitsResolver = Arc<dyn Fn(&str, &str) -> ResolvedContextLimits + Send + Sync>;
Expand description

Resolve capacity + proactive-trim budget for one (provider, model) route.

The turn engine’s SINGLE authority for per-call limits. Daemon-backed agents hand in a closure that reads the shared live Config, so a config reload between turns is observed; configless (test) paths omit it and the loop falls back to the route pair resolved at the turn boundary. Keeping one resolver here prevents the loop from recomputing half the pair from a construction-time config snapshot.

Aliased Type§

pub struct ContextLimitsResolver { /* private fields */ }