pub struct Catalog {
pub extracted_at: String,
pub go: Go,
pub zen: Zen,
}Fields§
§extracted_at: String§go: Go§zen: ZenImplementations§
Source§impl Catalog
impl Catalog
Source§impl Catalog
impl Catalog
Sourcepub fn price(
&self,
model_id: &str,
at_ms: i64,
input: u64,
output: u64,
reasoning: u64,
cache_read: u64,
cache_write: u64,
) -> Option<f64>
pub fn price( &self, model_id: &str, at_ms: i64, input: u64, output: u64, reasoning: u64, cache_read: u64, cache_write: u64, ) -> Option<f64>
What one turn costs on the documented sheets, or None when the model is
unknown or free (no rate rows), so the caller can fall back to cost.
reasoning is billed at the output rate — opencode does the same in its
own cost, verified to the cent on real rows.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Catalog
impl<'de> Deserialize<'de> for Catalog
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
Auto Trait Implementations§
impl Freeze for Catalog
impl RefUnwindSafe for Catalog
impl Send for Catalog
impl Sync for Catalog
impl Unpin for Catalog
impl UnsafeUnpin for Catalog
impl UnwindSafe for Catalog
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