pub struct CompressionConfig {
pub strategy: CompressionStrategy,
pub pruning_strategy: PruningStrategy,
pub model: String,
pub compress_provider: ProviderName,
pub probe: CompactionProbeConfig,
pub archive_tool_outputs: bool,
pub focus_scorer_provider: ProviderName,
pub high_density_budget: f32,
pub low_density_budget: f32,
pub predictor: CompressionPredictorConfig,
}Expand description
Configuration for active context compression (#1161).
Fields§
§strategy: CompressionStrategyCompression strategy.
pruning_strategy: PruningStrategyTool-output pruning strategy (requires context-compression feature).
model: StringModel to use for compression summaries.
Currently unused — the primary summary provider is used regardless of this value. Reserved for future per-compression model selection. Setting this field has no effect.
compress_provider: ProviderNameProvider name from [[llm.providers]] for compress_context summaries.
Falls back to the primary provider when empty. Default: "".
probe: CompactionProbeConfigCompaction probe: validates summary quality before committing it (#1609).
archive_tool_outputs: boolArchive tool output bodies to SQLite before compaction (Memex #2432).
When enabled, tool output bodies in the compaction range are saved to
tool_overflow with archive_type = 'archive' before summarization.
The LLM summarizes placeholder messages; archived content is appended as
a postfix after summarization so references survive compaction.
Default: false.
focus_scorer_provider: ProviderNameProvider for Focus strategy segment scoring (#2510).
Falls back to the primary provider when empty. Default: "".
high_density_budget: f32Token-budget fraction for high-density content in density-aware compression (#2481).
Must sum to 1.0 with low_density_budget. Default: 0.7.
low_density_budget: f32Token-budget fraction for low-density content in density-aware compression (#2481).
Must sum to 1.0 with high_density_budget. Default: 0.3.
predictor: CompressionPredictorConfigPerformance-floor compression ratio predictor (#2460).
Trait Implementations§
Source§impl Clone for CompressionConfig
impl Clone for CompressionConfig
Source§fn clone(&self) -> CompressionConfig
fn clone(&self) -> CompressionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompressionConfig
impl Debug for CompressionConfig
Source§impl Default for CompressionConfig
impl Default for CompressionConfig
Source§fn default() -> CompressionConfig
fn default() -> CompressionConfig
Source§impl<'de> Deserialize<'de> for CompressionConfigwhere
CompressionConfig: Default,
impl<'de> Deserialize<'de> for CompressionConfigwhere
CompressionConfig: Default,
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>,
Auto Trait Implementations§
impl Freeze for CompressionConfig
impl RefUnwindSafe for CompressionConfig
impl Send for CompressionConfig
impl Sync for CompressionConfig
impl Unpin for CompressionConfig
impl UnsafeUnpin for CompressionConfig
impl UnwindSafe for CompressionConfig
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> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request