From a78fa808241f6ac1aff4001f047f1d6cd51f02ce Mon Sep 17 00:00:00 2001 From: Udit Date: Mon, 27 Apr 2026 22:46:58 +0530 Subject: [PATCH] fix: correct transcription mode string and add missing non-chat modes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace 'transcription' with 'audio_transcription' (the actual mode string used by whisper-1 and all other transcription models in model_prices_and_context_window.json) - Add image_edit, ocr, search, moderation to _NON_CHAT_MODES — all reject max_tokens - Update parametrized test to use real mode strings from the model registry --- litellm/proxy/health_check.py | 6 +++++- tests/test_litellm/proxy/test_health_check_max_tokens.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/health_check.py b/litellm/proxy/health_check.py index 62721799662..f4cffcd1875 100644 --- a/litellm/proxy/health_check.py +++ b/litellm/proxy/health_check.py @@ -368,11 +368,15 @@ def _update_litellm_params_for_health_check( """ _NON_CHAT_MODES = { "image_generation", + "image_edit", "video_generation", "embedding", "rerank", - "transcription", + "audio_transcription", "audio_speech", + "ocr", + "search", + "moderation", } _mode = model_info.get("mode", None) litellm_params["messages"] = _get_random_llm_message() diff --git a/tests/test_litellm/proxy/test_health_check_max_tokens.py b/tests/test_litellm/proxy/test_health_check_max_tokens.py index 2d2b4eac9fe..ad1264c7ca8 100644 --- a/tests/test_litellm/proxy/test_health_check_max_tokens.py +++ b/tests/test_litellm/proxy/test_health_check_max_tokens.py @@ -90,11 +90,15 @@ async def test_ahealth_check_wildcard_models_respects_max_tokens(): "mode", [ "image_generation", + "image_edit", "video_generation", "embedding", "rerank", - "transcription", + "audio_transcription", "audio_speech", + "ocr", + "search", + "moderation", ], ) @pytest.mark.asyncio