pub struct Table {
pub entries: Vec<Entry>,
pub updated: Option<String>,
pub user_path: Option<PathBuf>,
pub warnings: Vec<String>,
pub web_search_per_1k: Option<f64>,
pub web_search_origin: Option<Origin>,
}Expand description
The effective table, plus anything the user should be told about how it was built. A bad user file must never take the built-in prices down with it, and must never be swallowed either: it is reported and the built-ins stand.
Fields§
§entries: Vec<Entry>§updated: Option<String>§user_path: Option<PathBuf>§warnings: Vec<String>§web_search_per_1k: Option<f64>USD per 1,000 web searches, when the table prices them.
web_search_origin: Option<Origin>Implementations§
Source§impl Table
impl Table
Sourcepub fn web_search_cost(&self, n: u64) -> f64
pub fn web_search_cost(&self, n: u64) -> f64
USD for n web searches, or zero when the table does not price them.
Anthropic bills web search per search on top of the tokens it produces;
web fetch and code execution alongside it are free (checked 2026-09-04).
pub fn lookup(&self, model: &str) -> Option<Price>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnsafeUnpin for Table
impl UnwindSafe for Table
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