pub struct PriceSnapshot {
pub prompt_per_m: f64,
pub completion_per_m: f64,
pub source: String,
pub fetched_at: String,
pub hash: String,
}Expand description
Pinned pricing snapshot carried on ProtocolEvent::ModelRouteDecision
(ADR docs/canon/daemon-master-canon-atoms.md §D5). Mirrors
the (model, prompt_per_m, completion_per_m, source, fetched_at, hash)
tuple named in §D4 for pricing refresh, but this crate carries no
dependency on host_router/host_providers (pure data crate) —
the seam that emits the event fills these fields from the live roster.
Fields§
§prompt_per_m: f64§completion_per_m: f64§source: StringWhere this pricing row came from — "bundled" in R1a (R1c adds
"openrouter" / "litellm" for live-refreshed rows).
fetched_at: String§hash: StringStable hash of the pricing row content, so a UI can detect that the snapshot backing an old chip has since changed.
Trait Implementations§
Source§impl Clone for PriceSnapshot
impl Clone for PriceSnapshot
Source§impl Debug for PriceSnapshot
impl Debug for PriceSnapshot
Source§impl<'de> Deserialize<'de> for PriceSnapshot
impl<'de> Deserialize<'de> for PriceSnapshot
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 PriceSnapshot
impl PartialEq for PriceSnapshot
Source§impl Serialize for PriceSnapshot
impl Serialize for PriceSnapshot
impl StructuralPartialEq for PriceSnapshot
Auto Trait Implementations§
impl Freeze for PriceSnapshot
impl RefUnwindSafe for PriceSnapshot
impl Send for PriceSnapshot
impl Sync for PriceSnapshot
impl Unpin for PriceSnapshot
impl UnsafeUnpin for PriceSnapshot
impl UnwindSafe for PriceSnapshot
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