The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test(realtime): pin mode-only transcription detection and correct a stale docstring
mateo-berri7c717c7c6a2f
diff --git a/tests/test_litellm/llms/github_copilot/responses/test_github_copilot_responses_transformation.py b/tests/test_litellm/llms/github_copilot/responses/test_github_copilot_responses_transformation.pyindex c761d084da8..0174465b0cc 100644--- a/tests/test_litellm/llms/github_copilot/responses/test_github_copilot_responses_transformation.py+++ b/tests/test_litellm/llms/github_copilot/responses/test_github_copilot_responses_transformation.py@@ -436,10 +436,9 @@ class TestGithubCopilotResponsesAPIRouting:catalog entries that lack ``mode``).Exercises the real ``_cached_get_model_info_helper`` plumbing via- ``register_model`` (no mock). ``supported_endpoints`` is not carried on- the normalized ``ModelInfoBase`` the helper returns, so the gate must- read it from the raw ``litellm.model_cost`` entry; a mock-based test- would mask that.+ ``register_model`` (no mock). The gate reads ``supported_endpoints``+ from the raw ``litellm.model_cost`` entry; a mock-based test would+ mask that."""litellm.register_model({diff --git a/tests/test_litellm/realtime_api/test_main.py b/tests/test_litellm/realtime_api/test_main.pyindex 4b0bae1458e..a3dd5688ad1 100644--- a/tests/test_litellm/realtime_api/test_main.py+++ b/tests/test_litellm/realtime_api/test_main.py@@ -254,6 +254,16 @@ async def test_azure_health_check_stays_on_ga_when_deployment_registration_overwassert connect.url == "wss://my-endpoint.openai.azure.com/openai/v1/realtime?intent=transcription"+def test_transcription_only_detection_falls_back_to_mode(local_model_cost_map):+ """azure/whisper-1 declares mode audio_transcription but no supported_endpoints,+ so only the mode signal can classify it as transcription-only."""+ assert realtime_main._is_transcription_only_realtime_model("whisper-1", "azure") is True+++def test_transcription_only_detection_rejects_speech_model(local_model_cost_map):+ assert realtime_main._is_transcription_only_realtime_model("gpt-realtime-mini", "azure") is False++@pytest.mark.asyncioasync def test_azure_health_check_keeps_beta_path_for_speech_model():connect = _CapturingConnect()