From 763cb04df2a3c0153bae62c7cf61922dfbaa7df2 Mon Sep 17 00:00:00 2001 From: shrey kharbanda Date: Mon, 26 Oct 2026 12:20:32 -0700 Subject: [PATCH] chore(cost-map): add Deepgram Aura-2 and Aura-1 text-to-speech rates Deepgram bills streaming text-to-speech per input character, at $0.030 per 1k characters for Aura-2 voices and $0.0150 per 1k for Aura-1 voices on pay as you go (https://deepgram.com/pricing). One row per voice family keeps the map small, since every voice in a family costs the same The upcoming /deepgram/v1/speak WebSocket passthrough prices sessions from these rows and refuses voices that have none Refs LIT-10070 --- ...odel_prices_and_context_window_backup.json | 26 +++++++++++++++++++ model_prices_and_context_window.json | 26 +++++++++++++++++++ .../deepgram/test_deepgram_common_utils.py | 20 ++++++++++++++ tests/unit/test_utils.py | 1 + 4 files changed, 73 insertions(+) diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index 1f2bd7d7837..446af103664 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -22775,6 +22775,32 @@ "output_cost_per_token_batches": 1e-06, "source": "https://developers.openai.com/api/docs/pricing" }, + "deepgram/aura": { + "input_cost_per_character": 1.5e-05, + "litellm_provider": "deepgram", + "metadata": { + "calculation": "$0.0150/1000 characters = $0.000015 per character", + "note": "Aura-1 text-to-speech voices (aura--), pay as you go" + }, + "mode": "audio_speech", + "source": "https://deepgram.com/pricing", + "supported_endpoints": [ + "/v1/speak" + ] + }, + "deepgram/aura-2": { + "input_cost_per_character": 3e-05, + "litellm_provider": "deepgram", + "metadata": { + "calculation": "$0.030/1000 characters = $0.00003 per character", + "note": "Aura-2 text-to-speech voices (aura-2--), pay as you go" + }, + "mode": "audio_speech", + "source": "https://deepgram.com/pricing", + "supported_endpoints": [ + "/v1/speak" + ] + }, "deepgram/base": { "input_cost_per_second": 0.00020833, "litellm_provider": "deepgram", diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index 1f2bd7d7837..446af103664 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -22775,6 +22775,32 @@ "output_cost_per_token_batches": 1e-06, "source": "https://developers.openai.com/api/docs/pricing" }, + "deepgram/aura": { + "input_cost_per_character": 1.5e-05, + "litellm_provider": "deepgram", + "metadata": { + "calculation": "$0.0150/1000 characters = $0.000015 per character", + "note": "Aura-1 text-to-speech voices (aura--), pay as you go" + }, + "mode": "audio_speech", + "source": "https://deepgram.com/pricing", + "supported_endpoints": [ + "/v1/speak" + ] + }, + "deepgram/aura-2": { + "input_cost_per_character": 3e-05, + "litellm_provider": "deepgram", + "metadata": { + "calculation": "$0.030/1000 characters = $0.00003 per character", + "note": "Aura-2 text-to-speech voices (aura-2--), pay as you go" + }, + "mode": "audio_speech", + "source": "https://deepgram.com/pricing", + "supported_endpoints": [ + "/v1/speak" + ] + }, "deepgram/base": { "input_cost_per_second": 0.00020833, "litellm_provider": "deepgram", diff --git a/tests/unit/llms/deepgram/test_deepgram_common_utils.py b/tests/unit/llms/deepgram/test_deepgram_common_utils.py index 530888b70c4..7f480d3459f 100644 --- a/tests/unit/llms/deepgram/test_deepgram_common_utils.py +++ b/tests/unit/llms/deepgram/test_deepgram_common_utils.py @@ -324,3 +324,23 @@ def test_deepgram_listen_is_priced( ) def test_deepgram_listen_addon_pricing_models(upstream_url: str, expected: tuple[str, ...]): assert deepgram_listen_addon_pricing_models(upstream_url) == expected + + +@pytest.mark.usefixtures("local_model_cost_map") +@pytest.mark.parametrize( + ("pricing_model", "usd_per_thousand_characters"), + [ + pytest.param("aura-2", 0.030, id="aura-2"), + pytest.param("aura", 0.015, id="aura-1"), + ], +) +def test_aura_rows_bill_speech_per_character_at_the_published_rate( + pricing_model: str, usd_per_thousand_characters: float +): + """Pay as you go rates from https://deepgram.com/pricing, checked 2026-10-26""" + prompt_cost, completion_cost = litellm.cost_per_token( + model=pricing_model, custom_llm_provider="deepgram", call_type="speech", prompt_characters=1000 + ) + + assert prompt_cost == pytest.approx(usd_per_thousand_characters) + assert completion_cost == 0.0 diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 146e2df6413..07747ac5702 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -1252,6 +1252,7 @@ _COST_MAP_ROW_SCHEMA: Final = { "/v1/videos", "/vertex_ai/live", "/v1/listen", + "/v1/speak", "/v1/systemone", "/v1/decisions", "/v1beta/interactions",