feat: add voice providers and fix research provider mappings - #5
Merged
Merged
Conversation
Adds speech-to-text and text-to-speech models to the catalog, and fixes
two mapping bugs found while validating the merge against live upstream
data.
Voice providers
---------------
Adds deepgram, elevenlabs, assemblyai, aws_polly and groq to
LITELLM_TO_TENSORZERO / TENSORZERO_PROVIDERS, with matching STRIP_PREFIXES
entries (all five key their LiteLLM entries as `{provider}/{model}`).
deepgram, elevenlabs and groq also map into LITELLM_TO_RESEARCH, where
truefoundry/models carries cost data for them.
This brings 63 voice models into the catalog: deepgram 42, groq 10,
elevenlabs 5, aws_polly 4, assemblyai 2, priced per second or per
character.
sarvam and tencent are deliberately left out — they appear in LiteLLM but
every entry is `mode: chat`, not audio. Cartesia and the other vendors on
the voice list have no entries in either upstream source.
Fix: azure and xai research mappings
------------------------------------
LITELLM_TO_RESEARCH pointed at `azure-openai` and `x-ai`; the real
truefoundry/models directories are `azure-open-ai` and `xai`. The lookup
silently never matched, so both providers kept LiteLLM's costs and skipped
deprecation filtering entirely. Fixing it matches 117 azure and 55 xai
models, and correctly drops 41 stale azure entries.
`moonshotai` -> `moonshot-ai` is left as-is: not a typo, upstream has no
moonshot directory at all.
Fix: coerce string costs from research YAML
-------------------------------------------
truefoundry writes small costs as `5e-7`. YAML 1.1 requires a decimal
point in scientific notation, so PyYAML parses those as strings and the
merge replaced LiteLLM's numeric cost with a string, breaking downstream
arithmetic. This already affected 166 values at HEAD (openai, anthropic,
gemini, mistral, together_ai) and the azure/xai fix above would have
pushed it to 259. Now 0.
Verified end-to-end against live LiteLLM and truefoundry data.
Catalog total 1438 -> 1460. 70 tests pass (9 new), merger.py at 100%
coverage, ruff check and mypy clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds speech-to-text and text-to-speech models to the catalog, and fixes two mapping bugs found while validating the merge against live upstream data.
1. Voice providers
Adds
deepgram,elevenlabs,assemblyai,aws_pollyandgroqtoLITELLM_TO_TENSORZERO/TENSORZERO_PROVIDERS, with matchingSTRIP_PREFIXESentries (all five key their LiteLLM entries as{provider}/{model}, so the prefix is stripped rather than doubled).deepgram,elevenlabsandgroqalso map intoLITELLM_TO_RESEARCH, where truefoundry/models carries cost data for them.63 voice models now in the catalog:
deepgramgroqelevenlabsaws_pollyassemblyaie.g.
deepgram/nova-3→input_cost_per_second: 7.167e-05;elevenlabs/eleven_multilingual_v2→input_cost_per_character: 0.0001.2. Fix:
azureandxairesearch mappingsLITELLM_TO_RESEARCHpointed atazure-openaiandx-ai; the real truefoundry/models directories areazure-open-aiandxai. The lookup silently never matched, so both providers kept LiteLLM's costs and skipped deprecation filtering entirely.Fixing it matches 117 azure and 55 xai models.
3. Fix: coerce string costs from research YAML
truefoundry writes small costs as
5e-7. YAML 1.1 requires a decimal point in scientific notation, so PyYAML parses those as strings — and the merge was replacing LiteLLM's numeric cost with a string, breaking any downstream arithmetic.This already affected 166 values on
main(openai, anthropic, gemini, mistral, together_ai). The azure/xai fix above would have pushed it to 259. Now 0.Why
The voice providers were the ask; the two fixes fell out of verifying it. The string-cost bug is pre-existing on
mainand independent of the voice work — it just gets worse without the fix, so it ships here.Reviewer notes
Two output changes that will look like regressions in a naive diff but are intended:
cost_fields_updateddrops 366 → 133. The string-vs-float mismatch was counting'5e-7' != 5e-7as an update on every merge. The stat now reflects real changes.Deliberately not included:
sarvamandtencent— on the voice provider list and present in LiteLLM, but all four entries aremode: chat, not audio. Adding them would put chat models under providers that bud-connect routes to WaaV.moonshotai→moonshot-aiis left as-is. Not a typo — upstream has no moonshot directory at all.groqis added whole, which brings 15 chat models alongside its 5 audio ones. They're real Groq models with real pricing; filtering a provider to audio-only seemed the stranger choice. Easy to gate if you'd rather.Downstream
This affects
bud-connect'sNO_MODEL_PROVIDERS(constants.py). Those five providers now have catalog models, so the seeder's model walk reaches them and the explicit entries become redundant — harmless, but the comment's premise no longer holds for them, andtests/test_voice_providers.pylikely needs updating. Separate repo, separate change.Testing
Verified end-to-end against live LiteLLM and truefoundry/models data, before/after diffed.
merger.pyat 100% coverageruff checkandmypycleanNote: the dev machine only has Python 3.9 and the project requires ≥3.10, so the suite was run against a shimmed copy outside the repo. CI covers 3.10–3.13 properly.
🤖 Generated with Claude Code