pub struct OverflowConfig {
pub threshold: usize,
pub retention_days: u64,
pub max_overflow_bytes: usize,
pub max_per_call_override: usize,
}Expand description
Configuration for large tool response offload to SQLite.
Fields§
§threshold: usizeCharacter threshold above which tool output is offloaded. Default: 50000.
retention_days: u64Days to retain offloaded entries. Default: 7.
max_overflow_bytes: usizeMaximum bytes per overflow entry. 0 means unlimited. Default: 10 MiB.
max_per_call_override: usizeHard ceiling (in chars) on a per-call result-size override that an MCP
server may request via _meta["zeph/maxResultSizeChars"]. The server’s
request is clamped to min(requested, max_per_call_override) and may only
raise the effective limit above threshold, never lower
it. A value at or below threshold disables per-call overrides entirely.
Raising the effective limit also enlarges how much of that call’s output
counts against the turn’s context budget, not just summarizer cost.
Default: 131072 (128 KiB).
Note: unlike max_overflow_bytes, 0 here
does NOT mean “unlimited” — it disables overrides (the clamp floors at
threshold).
Note: for sanitized (external/untrusted, :-qualified) MCP output, the effective
in-context ceiling under default config is actually zeph-sanitizer’s
ContentIsolationConfig::max_content_size (65536 bytes by default), which is
smaller than this field’s 131072-char default and caps what reaches the LLM
downstream of this clamp — a fail-safe (lower, not higher) bound, not a hole.
Trait Implementations§
Source§impl Clone for OverflowConfig
impl Clone for OverflowConfig
Source§fn clone(&self) -> OverflowConfig
fn clone(&self) -> OverflowConfig
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 OverflowConfig
impl Debug for OverflowConfig
Source§impl Default for OverflowConfig
impl Default for OverflowConfig
Source§fn default() -> OverflowConfig
fn default() -> OverflowConfig
Source§impl<'de> Deserialize<'de> for OverflowConfig
impl<'de> Deserialize<'de> for OverflowConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OverflowConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OverflowConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for OverflowConfig
impl Serialize for OverflowConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for OverflowConfig
impl RefUnwindSafe for OverflowConfig
impl Send for OverflowConfig
impl Sync for OverflowConfig
impl Unpin for OverflowConfig
impl UnsafeUnpin for OverflowConfig
impl UnwindSafe for OverflowConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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