mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-06 07:48:06 +00:00
Deepgram streams Aura text-to-speech over a WebSocket at /v1/speak. The proxy now relays it at /deepgram/v1/speak and /deepgram/speak with the same key auth (Bearer or a Deepgram SDK's Token scheme), provider key injection and server-configured DEEPGRAM_API_BASE as the listen route. A caller-supplied api_base is never honored The route names exactly one voice upstream, the first model in the query or aura-asteria-en when none is given, and authorizes the key against that same voice. A missing DEEPGRAM_API_KEY is closed with 1011 before the socket is accepted A session is billed at one cost-map row. An aura-2-<name>-<xx> voice uses deepgram/aura-2, an aura-<name>-<xx> voice uses deepgram/aura, and any other voice uses a row named after itself, deepgram/<voice>. When that row has no input_cost_per_character the socket is closed with 1008 before Deepgram is contacted, naming the row to add, so a new generation such as aura-3-x-en is refused rather than billed at another generation's rate, and adding its row is enough to enable it Spend is the relay's client text count times that rate. Only the length of each Speak message's text is counted, whether it arrives in a text or a binary frame, so Flush, Clear, Close and malformed frames add nothing, and the text never reaches the logging payload. The success handler gets one speak branch next to the listen branch, which takes its dispatcher one branch past the C901 limit, so the def carries a noqa with the reason That branch passes the dispatcher's untyped request_body and kwargs, as every branch does, so the listen channel_index check becomes a match statement to keep the type-check gate's unknown-argument count flat Refs LIT-10070 |
||
|---|---|---|
| .. | ||
| _support | ||
| audio_tests | ||
| base_sdk_tests | ||
| benchmarks | ||
| code_coverage_tests | ||
| documentation_tests | ||
| e2e | ||
| e2e_harness | ||
| fixtures | ||
| harness_e2e | ||
| integration | ||
| rust-python-harness | ||
| test_litellm_rust | ||
| typing | ||
| unit | ||
| windows_tests | ||
| __init__.py | ||
| _fake_openai_endpoint_server.py | ||
| _flush_vcr_cache.py | ||
| _live_test_helpers.py | ||
| _master_key.py | ||
| _openai_record_replay_proxy.py | ||
| _process_helpers.py | ||
| _vcr_conftest_common.py | ||
| _vcr_redis_persister.py | ||
| _wait_helpers.py | ||
| _ws_vcr.py | ||
| AGENTS.md | ||
| capturing_transport.py | ||
| eval_swe_bench.py | ||
| fake_openai_endpoint.py | ||
| gettysburg.wav | ||
| large_text.py | ||
| openai_batch_completions.jsonl | ||
| pyrightconfig.json | ||
| README.MD | ||
| test_logging.conf | ||
| test_rust_python_harness.py | ||
| VCR_TESTING.md | ||
| white_100x100.png | ||
In total litellm runs 1000+ tests
[02/20/2025] Update:
To make it easier to contribute and map what behavior is tested,
we've started mapping the litellm directory in tests/unit
This folder can only run mock tests.