Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
pub struct ModelPricing {
pub provider: String,
pub model_id: String,
pub aliases: Vec<String>,
pub currency: String,
pub unit: PricingUnit,
pub rates: Option<TokenPricingRates>,
pub rate_schedule: Option<TokenRateSchedule>,
pub prompt_cache: PromptCachePricing,
pub pricing_as_of: String,
pub pricing_source: String,
}
Per-token pricing for a model, expressed in USD per one million tokens.
provider: StringProvider that owns this pricing entry.
model_id: StringCanonical model ID for this pricing entry.
aliases: Vec<String>Additional model IDs that should use this pricing.
currency: StringISO 4217 currency for this pricing entry.
unit: PricingUnitBilling unit represented by this pricing entry.
rates: Option<TokenPricingRates>Token rates expressed as USD per one million tokens.
rate_schedule: Option<TokenRateSchedule>Data-driven token rate schedule for threshold-based provider pricing.
prompt_cache: PromptCachePricingPrompt-cache accounting model for this provider/model.
pricing_as_of: StringDate this pricing entry was last verified.
pricing_source: StringSource URL for this pricing entry.
impl ModelPricingimpl ModelPricing
estimate_costpub fn estimate_cost(&self, usage: &Usage) -> Option<CostEstimate>
Estimates cost for the provided token usage.
impl Clone for ModelPricingimpl Clone for ModelPricing
clonefn clone(&self) -> ModelPricing
clone_fromfn clone_from(&mut self, source: &Self)
impl Debug for ModelPricingimpl Debug for ModelPricing
fmtfn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'de> Deserialize<'de> for ModelPricingimpl<'de> Deserialize<'de> for ModelPricing
deserializefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl PartialEq for ModelPricingimpl PartialEq for ModelPricing
eqfn eq(&self, other: &ModelPricing) -> bool
nefn ne(&self, other: &Rhs) -> bool
impl Serialize for ModelPricingimpl Serialize for ModelPricing
serializefn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
impl StructuralPartialEq for ModelPricingimpl StructuralPartialEq for ModelPricing