pub struct UpstreamCandidate {
pub upstream_id: Uuid,
pub name: String,
pub kind: UpstreamKind,
pub observed_rate_limits: Vec<RateLimitObservation>,
pub subscription_quotas: Vec<SubscriptionQuotaCandidateSnapshot>,
pub observed_at_unix_secs: u64,
pub cache_score: Option<CacheScore>,
pub base_url: Option<String>,
}Expand description
Available upstream candidate for routing decisions.
The router receives a list of available upstream candidates sorted by
upstream_id in ascending order (Uuid byte order). This stable ordering
allows plugins to implement deterministic routing algorithms.
Fields§
§upstream_id: UuidStable upstream identifier.
name: StringOperator-facing upstream name.
kind: UpstreamKindUpstream kind used to select compatible routing strategies.
observed_rate_limits: Vec<RateLimitObservation>Latest rate-limit observations for this candidate.
subscription_quotas: Vec<SubscriptionQuotaCandidateSnapshot>Latest subscription quota snapshots for this candidate.
observed_at_unix_secs: u64Unix timestamp in seconds for the candidate observation snapshot.
cache_score: Option<CacheScore>Predicted cache utility for this candidate, if available.
base_url: Option<String>Resolved upstream base URL. Populated by the host so that v2 plugins that self-reference for shape can construct the dispatch URL against the configured upstream instead of hardcoding api.anthropic.com.
Trait Implementations§
Source§impl Clone for UpstreamCandidate
impl Clone for UpstreamCandidate
Source§fn clone(&self) -> UpstreamCandidate
fn clone(&self) -> UpstreamCandidate
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 UpstreamCandidate
impl Debug for UpstreamCandidate
Source§impl<'de> Deserialize<'de> for UpstreamCandidate
impl<'de> Deserialize<'de> for UpstreamCandidate
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>,
Source§impl PartialEq for UpstreamCandidate
impl PartialEq for UpstreamCandidate
Source§fn eq(&self, other: &UpstreamCandidate) -> bool
fn eq(&self, other: &UpstreamCandidate) -> bool
self and other values to be equal, and is used by ==.