v3.5.0
Added
- Multi-source pricing cascade — New
Pricing::DataStorewith two-layer cache (in-memory + Rails.cache) fetches pricing from 7 sources: user config, RubyLLM gem, LiteLLM, Portkey AI, OpenRouter, Helicone, and LLM Pricing AI. Lazy cascade stops at first match to minimize HTTP calls - 6 pricing adapters —
LiteLLMAdapter,PortkeyAdapter,OpenRouterAdapter,HeliconeAdapter,LLMPricingAdapter,RubyLLMAdaptereach normalize source-specific pricing into a common format covering text LLM, transcription, TTS, image, and embedding models - Transcription pricing refactored —
TranscriptionPricingnow uses shared adapters with 7-tier cascade instead of standalone LiteLLM fetch. Supportsinput_cost_per_audio_tokenfor GPT-4o-transcribe models (in addition toinput_cost_per_second) - Per-source configuration — New config options:
pricing_cache_ttl,portkey_pricing_enabled,openrouter_pricing_enabled,helicone_pricing_enabled,llmpricing_enabled, and URL overrides for each source - Integration test framework — Tests tagged
:integrationhit real pricing APIs (excluded by default, run withRUN_INTEGRATION=1). Covers API availability, schema stability, cross-source price consistency, and caching performance - Pricing wiki page — New Pricing documentation covering all sources, caching, configuration, and debugging
- Routing concern — Lightweight
include RubyLLM::Agents::Routingconcern for message classification. Define routes withrouteDSL, classify input withclassify(message), and get structuredRouting::Resultobjects with destination, confidence, and metadata - Dashboard router support — Router agent type shown in agent index with dedicated config panel displaying route definitions, default route, and confidence threshold
- Dynamic release command —
/releasecommand now auto-detects version bump type by analyzing commits, CHANGELOG sections, and file changes since the last tag
Changed
- User config now has highest priority in transcription pricing cascade (was #2, now #1)
TranscriptionPricing.refresh!now clears all pricing source caches viaDataStore.refresh!TranscriptionPricing.all_pricingreturns data from all 7 sources
Full Changelog: v3.4.0...v3.5.0