module RubyLLM::Providers::Gemini::Capabilities
def input_price_for(model_id)
-
(Float)
- the price per million tokens in USD
Parameters:
-
model_id
(String
) -- the model identifier
def input_price_for(model_id) base_price = PRICES.dig(pricing_family(model_id), :input) || default_input_price return base_price unless long_context_model?(model_id) # Apply different pricing for prompts longer than 128k tokens context_window_for(model_id) > 128_000 ? base_price * 2 : base_price end