Skip to content

v3.5.0

Choose a tag to compare

@adham90 adham90 released this 18 Feb 16:07
· 161 commits to main since this release

Added

  • Multi-source pricing cascade — New Pricing::DataStore with 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, RubyLLMAdapter each normalize source-specific pricing into a common format covering text LLM, transcription, TTS, image, and embedding models
  • Transcription pricing refactored — TranscriptionPricing now uses shared adapters with 7-tier cascade instead of standalone LiteLLM fetch. Supports input_cost_per_audio_token for GPT-4o-transcribe models (in addition to input_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 :integration hit real pricing APIs (excluded by default, run with RUN_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::Routing concern for message classification. Define routes with route DSL, classify input with classify(message), and get structured Routing::Result objects 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 — /release command 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 via DataStore.refresh!
  • TranscriptionPricing.all_pricing returns data from all 7 sources

Full Changelog: v3.4.0...v3.5.0