mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
feat(pricing): add soniox/stt-rt-v5 real-time STT pricing
This commit is contained in:
parent
bb6bb664b1
commit
9a3736487b
3 changed files with 48 additions and 0 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue