pub struct StreamLimits {
pub max_tool_json_bytes: usize,
pub max_thinking_bytes: usize,
pub max_compaction_bytes: usize,
}Expand description
Per-buffer byte caps for Claude SSE streaming.
Controls the maximum number of bytes accumulated in each streaming buffer before
excess data is discarded with a warning. All caps default to values that match the
pre-existing hardcoded constants, so omitting [llm.stream_limits] in the config
preserves identical behavior.
§Example (TOML)
[llm.stream_limits]
max_tool_json_bytes = 8388608 # 8 MiB — raise for unusually large tool results
max_thinking_bytes = 2097152 # 2 MiB — raise for deep extended-thinking runs
max_compaction_bytes = 65536 # 64 KiB — raise for verbose compaction summariesFields§
§max_tool_json_bytes: usizeMaximum bytes for an accumulated tool-use JSON buffer. Default: 4 MiB.
max_thinking_bytes: usizeMaximum bytes for an accumulated thinking block. Default: 1 MiB.
max_compaction_bytes: usizeMaximum bytes for an accumulated server-side compaction summary. Default: 32 KiB.
Trait Implementations§
Source§impl Clone for StreamLimits
impl Clone for StreamLimits
Source§fn clone(&self) -> StreamLimits
fn clone(&self) -> StreamLimits
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamLimits
impl Debug for StreamLimits
Source§impl Default for StreamLimits
impl Default for StreamLimits
Source§impl<'de> Deserialize<'de> for StreamLimits
impl<'de> Deserialize<'de> for StreamLimits
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for StreamLimits
Source§impl PartialEq for StreamLimits
impl PartialEq for StreamLimits
Source§fn eq(&self, other: &StreamLimits) -> bool
fn eq(&self, other: &StreamLimits) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for StreamLimits
impl Serialize for StreamLimits
impl StructuralPartialEq for StreamLimits
Auto Trait Implementations§
impl Freeze for StreamLimits
impl RefUnwindSafe for StreamLimits
impl Send for StreamLimits
impl Sync for StreamLimits
impl Unpin for StreamLimits
impl UnsafeUnpin for StreamLimits
impl UnwindSafe for StreamLimits
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
Mutably borrows from an owned value. Read more
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§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
Compare self to
key and return true if they are equal.