pub struct PacingConfig {
pub step_timeout_secs: Option<u64>,
pub loop_detection_min_elapsed_secs: Option<u64>,
pub loop_ignore_tools: Vec<String>,
pub message_timeout_scale_max: Option<u64>,
pub loop_detection_enabled: bool,
pub loop_detection_window_size: usize,
pub loop_detection_max_repeats: usize,
}Expand description
Pacing controls for slow/local LLM workloads ([pacing] section).
All fields are optional and default to values that preserve existing behavior. When set, they extend — not replace — the existing timeout and loop-detection subsystems.
Fields§
§step_timeout_secs: Option<u64>Per-step timeout in seconds: the maximum time allowed for a single
LLM inference turn, independent of the total message budget.
None means no per-step timeout (existing behavior).
loop_detection_min_elapsed_secs: Option<u64>Minimum elapsed seconds before loop detection activates.
Tasks completing under this threshold get aggressive loop protection;
longer-running tasks receive a grace period before the detector starts
counting. None means loop detection is always active (existing behavior).
loop_ignore_tools: Vec<String>Tool names excluded from identical-output / alternating-pattern loop
detection. Useful for browser workflows where browser_screenshot
structurally resembles a loop even when making progress.
message_timeout_scale_max: Option<u64>Override for the hardcoded timeout scaling cap (default: 4).
The channel message timeout budget is computed as:
message_timeout_secs * min(max_tool_iterations, message_timeout_scale_max)
Raising this value lets long multi-step tasks with slow local models
receive a proportionally larger budget without inflating the base timeout.
loop_detection_enabled: boolEnable pattern-based loop detection (exact repeat, ping-pong,
no-progress). Defaults to true.
loop_detection_window_size: usizeSliding window size for the pattern-based loop detector. Defaults to 20.
loop_detection_max_repeats: usizeNumber of consecutive identical tool+args calls before the first escalation (Warning). Defaults to 3.
Trait Implementations§
Source§impl Clone for PacingConfig
impl Clone for PacingConfig
Source§fn clone(&self) -> PacingConfig
fn clone(&self) -> PacingConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PacingConfig
impl Debug for PacingConfig
Source§impl Default for PacingConfig
impl Default for PacingConfig
Source§impl<'de> Deserialize<'de> for PacingConfig
impl<'de> Deserialize<'de> for PacingConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for PacingConfig
impl JsonSchema for PacingConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for PacingConfig
impl RefUnwindSafe for PacingConfig
impl Send for PacingConfig
impl Sync for PacingConfig
impl Unpin for PacingConfig
impl UnsafeUnpin for PacingConfig
impl UnwindSafe for PacingConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more