Module: RubyLLM::Agents::Pricing::HeliconeAdapter
- Extended by:
- HeliconeAdapter
- Included in:
- HeliconeAdapter
- Defined in:
- lib/ruby_llm/agents/pricing/helicone_adapter.rb
Overview
Normalizes Helicone bulk cost list into the common pricing format.
Helicone prices are **per 1M tokens**. This adapter converts to per-token for consistency.
Coverage: 172 text LLM models, some realtime audio models. No transcription, TTS, image, or embedding models.
Instance Method Summary collapse
-
#find_model(model_id) ⇒ Hash?
Find and normalize pricing for a model.
Instance Method Details
#find_model(model_id) ⇒ Hash?
Find and normalize pricing for a model
25 26 27 28 29 30 31 32 33 |
# File 'lib/ruby_llm/agents/pricing/helicone_adapter.rb', line 25 def find_model(model_id) data = DataStore.helicone_data return nil unless data.is_a?(Array) && data.any? entry = find_matching(data, model_id) return nil unless entry normalize(entry) end |