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: i64Model 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: CacheTtlThe 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: u32Consecutive failures of one tool before the turn stops.
context_window: u64Model context window in tokens; compaction triggers at 80% (M2).
fast_model: Option<String>Housekeeping model (compaction summarize); defaults to model.
compaction_reset: boolReset-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: boolInclude context_used% in the MOIM turn-context block (M4/#9).
Default true = M2 behavior; false to avoid inducing context anxiety.
evict_threshold_tokens: u64Evict 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
impl Clone for EngineConfig
Source§fn clone(&self) -> EngineConfig
fn clone(&self) -> EngineConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more