diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index 2cef600ea32..e4efa7b5ff8 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -45711,6 +45711,16 @@ ], "supports_audio_input": true }, + "soniox/stt-rt-v5": { + "litellm_provider": "soniox", + "max_output_tokens": 8000, + "max_tokens": 8000, + "input_cost_per_second": 0.0, + "output_cost_per_second": 3.33333e-05, + "mode": "audio_transcription", + "source": "https://soniox.com/pricing", + "supports_audio_input": true + }, "tensormesh/Qwen/Qwen3.5-397B-A17B-FP8": { "litellm_provider": "tensormesh", "mode": "chat", diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index db28118d52b..9f27fa4097b 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -45833,6 +45833,16 @@ ], "supports_audio_input": true }, + "soniox/stt-rt-v5": { + "litellm_provider": "soniox", + "max_output_tokens": 8000, + "max_tokens": 8000, + "input_cost_per_second": 0.0, + "output_cost_per_second": 3.33333e-05, + "mode": "audio_transcription", + "source": "https://soniox.com/pricing", + "supports_audio_input": true + }, "tensormesh/Qwen/Qwen3.5-397B-A17B-FP8": { "litellm_provider": "tensormesh", "mode": "chat", diff --git a/tests/test_litellm/test_cost_calculator.py b/tests/test_litellm/test_cost_calculator.py index 276ee96ed65..a2f7e933ff2 100644 --- a/tests/test_litellm/test_cost_calculator.py +++ b/tests/test_litellm/test_cost_calculator.py @@ -372,6 +372,34 @@ def test_vertex_chirp_3_transcription_cost_from_duration(): assert pytest.approx(cost, rel=1e-6) == expected_cost +def test_soniox_realtime_transcription_costs_more_than_async(): + """soniox/stt-rt-v5 bills at $0.12/hr, 20% above the $0.10/hr async models, + so it must not fall back to the async rate.""" + from litellm import completion_cost + + os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True" + litellm.model_cost = litellm.get_model_cost_map(url="") + + response = TranscriptionResponse(text="demo text") + response.duration = 3600.0 + + realtime_cost = completion_cost( + completion_response=response, + model="soniox/stt-rt-v5", + custom_llm_provider="soniox", + call_type="atranscription", + ) + async_cost = completion_cost( + completion_response=response, + model="soniox/stt-async-v5", + custom_llm_provider="soniox", + call_type="atranscription", + ) + + assert pytest.approx(realtime_cost, rel=1e-4) == 0.12 + assert pytest.approx(async_cost, rel=1e-4) == 0.10 + + def test_handle_realtime_stream_cost_calculation(): from litellm.cost_calculator import RealtimeAPITokenUsageProcessor