pub struct ContextConfig {
pub manager: ContextManager,
pub features: ContextFeatures,
pub semantic: SemanticConfig,
pub estimation: TokenEstimation,
pub summary_input_cap_floor_chars: usize,
pub api_surface: ApiSurfaceConfig,
pub input_ceiling_pct: u32,
pub low_budget_pct: usize,
}Expand description
[context] config section (Step 24.8, #559; features added Phase 26, #588).
Fields§
§manager: ContextManagerContext-management strategy preset. Default standard.
features: ContextFeaturesPer-feature overrides under [context.features] — each inherits the
manager preset’s default unless explicitly set (Phase 26, #588).
semantic: SemanticConfig[context.semantic] — settings for the semantic RAG feature (Step
26.5, #582).
estimation: TokenEstimation[context.estimation] — the cheap token-estimation heuristic
(chars_per_token, default 4). Threaded through the estimators; the
per-model calibration ratio scales the result on top.
summary_input_cap_floor_chars: usizeFloor (chars) for the whole-middle summarizer input cap. The cap is normally the compression budget converted to chars, but a tight budget would starve the summarizer of material — never give it less than this.
api_surface: ApiSurfaceConfig[context.api_surface] — the workspace-API-surface knowledge_base
technique + its pluggable language packs (#669).
input_ceiling_pct: u32Percent of a request’s num_ctx window usable as INPUT before the
pre-send budget gate trims (the rest is reply headroom). The historical
hardcoded value was 80 (reserve 20% for the reply). Large-window models
(e.g. Opus) can safely run this higher — raising it lets more context
ride each turn before trimming kicks in. Clamped to 1..=99; anything
outside falls back to 80. See num_ctx_input_ceiling (#282).
low_budget_pct: usizePercent-of-ceiling below which the loop emits the low-remaining-budget
nudge to the model. Historical hardcoded value was 15. Raise it to be
warned earlier, lower it to suppress the nudge on roomy models. Clamped
to 0..=100; 0 disables the nudge. See agentic::budget (#559).
Trait Implementations§
Source§impl Clone for ContextConfig
impl Clone for ContextConfig
Source§fn clone(&self) -> ContextConfig
fn clone(&self) -> ContextConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContextConfig
impl Debug for ContextConfig
Source§impl Default for ContextConfig
impl Default for ContextConfig
Source§impl<'de> Deserialize<'de> for ContextConfig
impl<'de> Deserialize<'de> for ContextConfig
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>,
impl Eq for ContextConfig
Source§impl PartialEq for ContextConfig
impl PartialEq for ContextConfig
Source§impl Serialize for ContextConfig
impl Serialize for ContextConfig
impl StructuralPartialEq for ContextConfig
Auto Trait Implementations§
impl Freeze for ContextConfig
impl RefUnwindSafe for ContextConfig
impl Send for ContextConfig
impl Sync for ContextConfig
impl Unpin for ContextConfig
impl UnsafeUnpin for ContextConfig
impl UnwindSafe for ContextConfig
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
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
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 more