From 9a0f2885b30fefb555d64cfde2484bd69d4139d5 Mon Sep 17 00:00:00 2001 From: oss-agent-shin <279349115+oss-agent-shin@users.noreply.github.com> Date: Sat, 9 May 2026 00:32:25 +0000 Subject: [PATCH] fix azure speech model cost schema Co-authored-by: ishaan-berri --- tests/test_litellm/test_utils.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.py index 65305e1a81e..b6d2af678df 100644 --- a/tests/test_litellm/test_utils.py +++ b/tests/test_litellm/test_utils.py @@ -692,6 +692,10 @@ def test_aaamodel_prices_and_context_window_json_is_valid(): "type": "object", "properties": { "supports_computer_use": {"type": "boolean"}, + "audio_transcription_config": { + "type": "string", + "enum": ["azure_speech"], + }, "cache_creation_input_audio_token_cost": {"type": "number"}, "cache_creation_input_token_cost": {"type": "number"}, "cache_creation_input_token_cost_above_1hr": {"type": "number"}, @@ -981,6 +985,27 @@ def test_aaamodel_prices_and_context_window_json_is_valid(): raise AssertionError(error_message) +def test_azure_speech_audio_transcription_config_is_valid_model_cost_metadata(): + """ + Regression guard for Azure Speech STT model-cost metadata. + + The strict model registry schema should allow the config marker used to + select the Azure Speech transcription transformation. + """ + + test_aaamodel_prices_and_context_window_json_is_valid() + prod_json = os.path.join( + os.path.dirname(__file__), "..", "..", "model_prices_and_context_window.json" + ) + with open(prod_json, "r") as model_prices_file: + actual_json = json.load(model_prices_file) + + assert ( + actual_json["azure/speech/azure-stt"]["audio_transcription_config"] + == "azure_speech" + ) + + def test_max_tokens_consistency(): """ Test that max_tokens == max_output_tokens for all models.