Skip to main content

EngineConfig

Struct EngineConfig 

Source
pub struct EngineConfig {
Show 13 fields pub model: String, pub max_tokens: u32, pub max_turns: i64, pub thinking: bool, pub cache_static: bool, pub cache_ttl: CacheTtl, pub fallback_models: Vec<String>, pub tool_failure_budget: u32, pub context_window: u64, pub fast_model: Option<String>, pub compaction_reset: bool, pub show_context_pct: bool, pub evict_threshold_tokens: u64, /* private fields */
}

Fields§

§model: String§max_tokens: u32§max_turns: i64

Model samples one prompt may spend before the turn is cut short with Outcome::TurnLimit. Every tool round-trip costs one, so this is a step budget for the agent loop, not a count of conversational turns.

Negative = unlimited: the turn runs until the model stops on its own, the context fills, a tool budget trips, or the user cancels. That is a deliberate opt-in — the bound is what keeps an unattended (Auto/DontAsk) run from looping on the owner’s money, so removing it should be a choice, never a default.

§thinking: bool§cache_static: bool§cache_ttl: CacheTtl

The lifetime compose_request asks explicit-cache breakpoints for when cache_static is set (CachePolicy::Static { prefix_ttl } — consumed by the Anthropic serializer’s prefix and rolling-anchor markers; the latest marker always renders plain regardless). Default FiveMinutes; long-lived human-supervised surfaces (hotl tui, hotl acp, hotl bg/attach) raise it to OneHour after scaffold() returns, and sub-agent children pin it back to FiveMinutes explicitly in HotlChildBuilder::spawn_child.

§fallback_models: Vec<String>

Availability-only fallback models (≤3 total — RELIABILITY.md).

§tool_failure_budget: u32

Consecutive failures of one tool before the turn stops.

§context_window: u64

Model context window in tokens; compaction triggers at 80% (M2).

§fast_model: Option<String>

Housekeeping model (compaction summarize); defaults to model.

§compaction_reset: bool

Reset-mode compaction (M4/#9): the continuation gets the preserved prefix + digest only, no verbatim tail — a fresh slate rather than a summarized-then-refilling window. Default false = M2 in-place behavior.

§show_context_pct: bool

Include context_used% in the MOIM turn-context block (M4/#9). Default true = M2 behavior; false to avoid inducing context anxiety.

§evict_threshold_tokens: u64

Evict a successful tool result larger than this (estimated tokens) to a masked blob, leaving a head preview + read pointer (T4). 0 disables.

Trait Implementations§

Source§

impl Clone for EngineConfig

Source§

fn clone(&self) -> EngineConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EngineConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for EngineConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more