pub struct MaxPrice {
pub prompt: Option<f64>,
pub completion: Option<f64>,
pub request: Option<f64>,
pub image: Option<f64>,
}Expand description
Maximum price configuration for hard ceiling on costs.
If no eligible provider is at or under the ceiling, the request fails. Units are OpenRouter pricing units (e.g., dollars per million tokens).
Fields§
§prompt: Option<f64>Maximum price per prompt token
completion: Option<f64>Maximum price per completion token
request: Option<f64>Maximum price per request
image: Option<f64>Maximum price per image
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MaxPrice
impl<'de> Deserialize<'de> for MaxPrice
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MaxPrice, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MaxPrice, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for MaxPrice
impl Serialize for MaxPrice
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for MaxPrice
Auto Trait Implementations§
impl Freeze for MaxPrice
impl RefUnwindSafe for MaxPrice
impl Send for MaxPrice
impl Sync for MaxPrice
impl Unpin for MaxPrice
impl UnsafeUnpin for MaxPrice
impl UnwindSafe for MaxPrice
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