pub struct ProxyRoutingConfig {
pub strategy: RoutingStrategy,
pub fallback_on_error: bool,
pub tool_overrides: Vec<ProxyToolRule>,
}Expand description
Routing policy: global default strategy plus per-tool overrides.
Fields§
§strategy: RoutingStrategyDefault strategy applied to tools without a matching override.
fallback_on_error: boolFor LocalFirst / RemoteFirst: when the primary executor errors, retry with
the other executor. No-op for Remote / Local strategies.
tool_overrides: Vec<ProxyToolRule>First-match-wins list of per-tool overrides.
Implementations§
Source§impl ProxyRoutingConfig
impl ProxyRoutingConfig
Sourcepub fn strategy_for(&self, tool_name: &str) -> RoutingStrategy
pub fn strategy_for(&self, tool_name: &str) -> RoutingStrategy
Resolve the effective strategy for a tool name (without upstream prefix).
First-match wins across tool_overrides; falls back to the global strategy.
Sourcepub fn merged_with(
&self,
override_cfg: Option<&ProxyRoutingOverride>,
) -> ProxyRoutingConfig
pub fn merged_with( &self, override_cfg: Option<&ProxyRoutingOverride>, ) -> ProxyRoutingConfig
Merge a per-server override on top of this global config.
Only Some fields of the override win over the global config — omitted fields
are inherited. tool_overrides from the override are prepended so they match
before global rules; None there means “use the global list as-is”.
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
True iff this config equals the default — used for skip_serializing_if.
Trait Implementations§
Source§impl Clone for ProxyRoutingConfig
impl Clone for ProxyRoutingConfig
Source§fn clone(&self) -> ProxyRoutingConfig
fn clone(&self) -> ProxyRoutingConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more