From b28e9ce6f56bca747321ffbd72f29c35b5fed8c1 Mon Sep 17 00:00:00 2001 From: dotmobo <1997638+dotmobo@users.noreply.github.com> Date: Tue, 8 Jul 2025 15:48:50 +0200 Subject: [PATCH 1/3] fix: add missing timestamp_granularities in default_params for get_optional_params_transcription --- litellm/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litellm/utils.py b/litellm/utils.py index 3ac19ca1a8..433eb02153 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -2380,6 +2380,7 @@ def get_optional_params_transcription( "prompt": None, "response_format": None, "temperature": None, # openai defaults this to 0 + "timestamp_granularities": None } non_default_params = { From e69107466f1465acb23cc11ef6525f268c72040d Mon Sep 17 00:00:00 2001 From: dotmobo <1997638+dotmobo@users.noreply.github.com> Date: Tue, 8 Jul 2025 16:16:12 +0200 Subject: [PATCH 2/3] [TECH] fix TU --- tests/llm_translation/test_openai.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/llm_translation/test_openai.py b/tests/llm_translation/test_openai.py index 8e6ab53df7..b20fb7db1c 100644 --- a/tests/llm_translation/test_openai.py +++ b/tests/llm_translation/test_openai.py @@ -451,6 +451,8 @@ class TestOpenAIGPT4OAudioTranscription(BaseLLMAudioTranscriptionTest): def get_base_audio_transcription_call_args(self) -> dict: return { "model": "openai/gpt-4o-transcribe", + "response_format": "verbose_json", + "timestamp_granularities": ["word"], } def get_custom_llm_provider(self) -> litellm.LlmProviders: From d94eda6cf3d5d357de5498817b6232aab5676980 Mon Sep 17 00:00:00 2001 From: dotmobo <1997638+dotmobo@users.noreply.github.com> Date: Tue, 8 Jul 2025 16:36:11 +0200 Subject: [PATCH 3/3] [TECH] fix TU 2 --- tests/local_testing/test_whisper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/local_testing/test_whisper.py b/tests/local_testing/test_whisper.py index 54bbcaa93d..022af6d1cf 100644 --- a/tests/local_testing/test_whisper.py +++ b/tests/local_testing/test_whisper.py @@ -66,6 +66,7 @@ async def test_transcription( api_key=api_key, api_base=api_base, response_format=response_format, + timestamp_granularities=timestamp_granularities, drop_params=True, ) print(f"transcript: {transcript.model_dump()}")