mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-29 01:42:19 +00:00
fix: correct transcription mode string and add missing non-chat modes
- 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
This commit is contained in:
parent
b5d047fbaf
commit
a78fa80824
2 changed files with 10 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue