Skip to content

v3.4.0

Choose a tag to compare

@adham90 adham90 released this 17 Feb 22:09
· 173 commits to main since this release

ElevenLabs Dynamic Pricing & Full Model Support

Added

  • ElevenLabs ModelRegistry — Fetches and caches model data from ElevenLabs /v1/models API using the user's API key. Provides model capability queries: TTS support, voice conversion, cost multiplier, max characters, languages, style/speaker_boost support
  • Dynamic ElevenLabs pricing — New Tier 3 in the pricing cascade uses character_cost_multiplier from the API × configurable elevenlabs_base_cost_per_1k base rate (default: $0.30). Replaces hardcoded per-model prices with live API data
  • elevenlabs_base_cost_per_1k config — Configurable base cost per 1K characters for ElevenLabs pricing (default: 0.30, Pro plan overage rate)
  • elevenlabs_models_cache_ttl config — Cache TTL in seconds for ElevenLabs model data (default: 21,600 = 6 hours)
  • 28 native ElevenLabs output formats — Full pass-through support for ElevenLabs-native format strings (e.g., mp3_44100_192, pcm_16000, opus_48000_64, wav_22050)
  • Expanded format convenience map — Simple symbols :wav, :opus, :alaw now map to appropriate ElevenLabs native formats
  • ElevenLabs model validation — Speaker validates models before API calls: raises ConfigurationError for non-TTS models (speech-to-speech), warns on text exceeding max chars and unsupported settings
  • Native format MIME types — SpeechResult#content_type handles native format strings

Changed

  • SpeechPricing cascade expanded from 3 tiers to 4: LiteLLM → user config → ElevenLabs API → hardcoded fallbacks
  • ELEVENLABS_FORMAT_MAP expanded from 3 entries to 10 convenience mappings
  • Default PCM format mapping changed from pcm_44100 to pcm_24000

Full Changelog: v3.3.0...v3.4.0