pub struct ReputationConfig {
pub enabled: bool,
pub decay_factor: f64,
pub weight: f64,
pub min_observations: u64,
pub state_path: Option<String>,
}Expand description
Configuration for Bayesian reputation scoring (RAPS — Reputation-Adjusted Provider Selection).
When enabled, quality outcomes from tool execution shift the routing scores over time, giving an advantage to providers that consistently produce valid tool arguments.
Default: disabled. Set enabled = true to activate.
Fields§
§enabled: boolEnable reputation scoring. Default: false.
decay_factor: f64Session-level decay factor applied on each load. Range: (0.0, 1.0]. Default: 0.95. Lower values make reputation forget faster; 1.0 = no decay.
weight: f64Weight of reputation in routing score blend. Range: [0.0, 1.0]. Default: 0.3.
Warning: values above 0.5 can aggressively suppress low-reputation providers.
At weight = 1.0 with rep_factor = 0.0 (all failures), the routing score
drops to zero — the provider becomes unreachable for that session. Stick to
the default (0.3) unless you intentionally want strong reputation gating.
min_observations: u64Minimum quality observations before reputation influences routing. Default: 5.
state_path: Option<String>Path for persisting reputation state. Defaults to ~/.config/zeph/router_reputation_state.json.
Trait Implementations§
Source§impl Clone for ReputationConfig
impl Clone for ReputationConfig
Source§fn clone(&self) -> ReputationConfig
fn clone(&self) -> ReputationConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReputationConfig
impl Debug for ReputationConfig
Source§impl<'de> Deserialize<'de> for ReputationConfig
impl<'de> Deserialize<'de> for ReputationConfig
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 ReputationConfig
impl RefUnwindSafe for ReputationConfig
impl Send for ReputationConfig
impl Sync for ReputationConfig
impl Unpin for ReputationConfig
impl UnsafeUnpin for ReputationConfig
impl UnwindSafe for ReputationConfig
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