pub struct CostControlConfig {
pub enabled: bool,
pub keep_recent_tool_results: usize,
pub mask_after_tool_results: usize,
pub max_live_tool_result_bytes: usize,
pub max_uncached_input_tokens: u32,
pub min_cache_read_ratio: f32,
pub compact_after_tool_result_bytes: usize,
pub compact_min_input_tokens: usize,
}Expand description
Cost-control masking settings.
Unlike proactive compaction, this is cost-oriented rather than context-window-oriented: old bulky tool results should not stay verbatim in every request just because the model still has room for them.
Fields§
§enabled: boolEnable low-cost tool-result masking before every LLM call.
keep_recent_tool_results: usizeNumber of most-recent tool results to always keep verbatim.
mask_after_tool_results: usizeStart masking once this many tool results are present.
max_live_tool_result_bytes: usizeStart masking once aggregate live tool-result payload exceeds this many bytes.
max_uncached_input_tokens: u32If cumulative/session usage is available, mask when uncached input exceeds this.
min_cache_read_ratio: f32If cumulative/session usage is available, mask when cache read ratio falls below this.
compact_after_tool_result_bytes: usizeConsider durable compaction once raw tool-result history exceeds this many bytes.
compact_min_input_tokens: usizeDo not cost-trigger durable compaction for a smaller current prompt.
Trait Implementations§
Source§impl Clone for CostControlConfig
impl Clone for CostControlConfig
Source§fn clone(&self) -> CostControlConfig
fn clone(&self) -> CostControlConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more