pub struct PricingTier {
pub min_input_tokens: u32,
pub pricing: Pricing,
}model-discovery only.Expand description
A long-context price band: from min_input_tokens upwards, the provider
bills the whole call at pricing instead of the base rates.
Frontier models price long context at a premium — GPT-5.x doubles its input rate above 272K tokens, Gemini and Claude above 200K — so a source that publishes tiers must be billed through them, or a long-context run is priced at a fraction of what it costs and sails past its budget.
The bound is inclusive on both feeds, confirmed against each one’s
documentation rather than inferred from a field name. OpenRouter’s
provider docs state a tier “applies when input tokens meet or exceed the
min_context value”, so min_prompt_tokens maps straight across. The
models.dev SDK schema documents tier.size as “the context size at which
this tier starts to apply” / “pricing that applies from a given context size
upward” — also inclusive, so its size maps straight across too. (The
models.dev context_over_<n> field reads exclusive, but the schema marks it
a legacy projection to be superseded by tiers, so it does not define the
bound.)
Fields§
§min_input_tokens: u32The tier applies to a call whose input tokens reach this count.
pricing: PricingThe rates that replace the base rates for such a call. A source that restates only some rates for the band leaves the rest inheriting the base row, so this is the band’s effective pricing, already merged.
Trait Implementations§
Source§impl Clone for PricingTier
impl Clone for PricingTier
Source§fn clone(&self) -> PricingTier
fn clone(&self) -> PricingTier
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more