Struct ResolvedRuntime
pub struct ResolvedRuntime {Show 24 fields
pub compact_context: bool,
pub max_tool_iterations: usize,
pub max_execution_tree_iterations: Option<usize>,
pub max_history_messages: usize,
pub max_context_tokens: Option<usize>,
pub model_context_window: usize,
pub model_context_window_source: ModelContextWindowSource,
pub context_compact_ratio: Option<f64>,
pub parallel_tools: bool,
pub tool_dispatcher: String,
pub strict_tool_parsing: bool,
pub tool_call_dedup_exempt: Vec<String>,
pub tool_filter_groups: Vec<ToolFilterGroup>,
pub max_system_prompt_chars: usize,
pub thinking: ThinkingConfig,
pub history_pruning: HistoryPrunerConfig,
pub eval: EvalConfig,
pub auto_classify: Option<AutoClassifyConfig>,
pub effort_routing: Option<EffortRoutingConfig>,
pub context_compression: ContextCompressionConfig,
pub max_tool_result_chars: usize,
pub keep_tool_context_turns: usize,
pub tool_receipts: ToolReceiptsConfig,
pub prompt_injection_mode: SkillsPromptInjectionMode,
}Expand description
Runtime tunables resolved from the agent’s runtime profile. Populated
by Config::resolved_agent_config; never deserialized from the agent
table. The runtime profile is the sole config surface for these.
Fields§
§compact_context: bool§max_tool_iterations: usize§max_execution_tree_iterations: Option<usize>§max_history_messages: usizeHistory retention limit. Structured Agent and legacy loop sessions interpret this as complete turns; channel caches retain message rows.
max_context_tokens: Option<usize>Optional operator context budget from runtime_profiles.<name>.max_context_tokens.
Without an opt-in ratio, None preserves the legacy 32,000-token budget.
With a ratio, Some(n) clamps the model-relative threshold down to n.
Every positive result is also capped by the selected model capacity.
Some(0) disables proactive token-budget trimming.
NOT the provider max_tokens output limit.
model_context_window: usizeModel’s context window (max input tokens) — from provider config.
model_context_window_source: ModelContextWindowSourceWhether model_context_window came from the selected provider profile
or from the compatibility fallback for unknown/unconfigured capacity.
context_compact_ratio: Option<f64>Opt-in fraction of model_context_window at which proactive trimming
triggers. None preserves the legacy absolute-budget behavior.
parallel_tools: bool§tool_dispatcher: String§strict_tool_parsing: bool§tool_call_dedup_exempt: Vec<String>§tool_filter_groups: Vec<ToolFilterGroup>§max_system_prompt_chars: usize§thinking: ThinkingConfig§history_pruning: HistoryPrunerConfig§eval: EvalConfig§auto_classify: Option<AutoClassifyConfig>§effort_routing: Option<EffortRoutingConfig>§context_compression: ContextCompressionConfig§max_tool_result_chars: usize§keep_tool_context_turns: usize§tool_receipts: ToolReceiptsConfig§prompt_injection_mode: SkillsPromptInjectionModeImplementations§
Source§impl ResolvedRuntime
impl ResolvedRuntime
Sourcepub fn context_limits(&self) -> ResolvedContextLimits
pub fn context_limits(&self) -> ResolvedContextLimits
Resolve capacity and proactive budget for this runtime snapshot.
Sourcepub fn context_limits_for_model_window(
&self,
model_context_window: usize,
) -> ResolvedContextLimits
pub fn context_limits_for_model_window( &self, model_context_window: usize, ) -> ResolvedContextLimits
Apply this runtime policy to a route-selected model capacity.
Sourcepub fn effective_context_budget(&self) -> usize
pub fn effective_context_budget(&self) -> usize
Effective token budget for preemptive whole-turn history trimming.
Trait Implementations§
Source§impl Clone for ResolvedRuntime
impl Clone for ResolvedRuntime
Source§fn clone(&self) -> ResolvedRuntime
fn clone(&self) -> ResolvedRuntime
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResolvedRuntime
impl Debug for ResolvedRuntime
Source§impl Default for ResolvedRuntime
impl Default for ResolvedRuntime
Source§fn default() -> ResolvedRuntime
fn default() -> ResolvedRuntime
Auto Trait Implementations§
impl Freeze for ResolvedRuntime
impl RefUnwindSafe for ResolvedRuntime
impl Send for ResolvedRuntime
impl Sync for ResolvedRuntime
impl Unpin for ResolvedRuntime
impl UnsafeUnpin for ResolvedRuntime
impl UnwindSafe for ResolvedRuntime
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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