pub struct ProviderOverrides {
pub reasoning_effort: Option<String>,
}Expand description
Per-session LLM generation override parameters persisted across restarts (#4654).
Phase 1 captures reasoning_effort only. Serialized to JSON and stored in the
channel_preferences table under pref_key = "provider_overrides".
#[serde(default)] makes deserialization forward-compatible: a blob written by a newer
binary with additional fields is accepted, unknown fields are ignored, so the known params
still apply. (Issue #4654 originally specified deny_unknown_fields; this was intentionally
relaxed for forward compatibility — see PR and CHANGELOG.)
§Examples
use zeph_config::ProviderOverrides;
let overrides = ProviderOverrides {
reasoning_effort: Some("high".to_owned()),
};
assert!(!overrides.is_empty());
let empty = ProviderOverrides::default();
assert!(empty.is_empty());Fields§
§reasoning_effort: Option<String>OpenAI reasoning effort: "low", "medium", or "high". None = provider default.
Implementations§
Source§impl ProviderOverrides
impl ProviderOverrides
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true when no override is set.
Used by the persistence layer to skip writing an empty blob.
§Examples
use zeph_config::ProviderOverrides;
assert!(ProviderOverrides::default().is_empty());
assert!(!ProviderOverrides { reasoning_effort: Some("low".into()) }.is_empty());Trait Implementations§
Source§impl Clone for ProviderOverrides
impl Clone for ProviderOverrides
Source§fn clone(&self) -> ProviderOverrides
fn clone(&self) -> ProviderOverrides
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 ProviderOverrides
impl Debug for ProviderOverrides
Source§impl Default for ProviderOverrides
impl Default for ProviderOverrides
Source§fn default() -> ProviderOverrides
fn default() -> ProviderOverrides
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProviderOverrideswhere
ProviderOverrides: Default,
impl<'de> Deserialize<'de> for ProviderOverrideswhere
ProviderOverrides: 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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ProviderOverrides
impl PartialEq for ProviderOverrides
Source§fn eq(&self, other: &ProviderOverrides) -> bool
fn eq(&self, other: &ProviderOverrides) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ProviderOverrides
impl Serialize for ProviderOverrides
impl StructuralPartialEq for ProviderOverrides
Auto Trait Implementations§
impl Freeze for ProviderOverrides
impl RefUnwindSafe for ProviderOverrides
impl Send for ProviderOverrides
impl Sync for ProviderOverrides
impl Unpin for ProviderOverrides
impl UnsafeUnpin for ProviderOverrides
impl UnwindSafe for ProviderOverrides
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