From 732ab55cc8ff98a169f2accb688af5d264200a0b Mon Sep 17 00:00:00 2001 From: Hammad Saeed Date: Fri, 21 Mar 2025 16:55:35 -0700 Subject: [PATCH] fix(model_param_helper.py): update `_get_litellm_supported_transcription_kwargs()` to use proper annotations from `TranscriptionCreateParamsNonStreaming` & ``TranscriptionCreateParamsStreaming` --- litellm/litellm_core_utils/model_param_helper.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/litellm/litellm_core_utils/model_param_helper.py b/litellm/litellm_core_utils/model_param_helper.py index ebe3ce93fc0..3542ec3a944 100644 --- a/litellm/litellm_core_utils/model_param_helper.py +++ b/litellm/litellm_core_utils/model_param_helper.py @@ -1,6 +1,9 @@ from typing import Set -from openai.types.audio.transcription_create_params import TranscriptionCreateParams +from openai.types.audio.transcription_create_params import ( + TranscriptionCreateParamsNonStreaming, + TranscriptionCreateParamsStreaming, +) from openai.types.chat.completion_create_params import ( CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming, @@ -123,7 +126,10 @@ class ModelParamHelper: This follows the OpenAI API Spec """ - return set(TranscriptionCreateParams.__dict__.keys()) + all_transcription_kwargs = set( + TranscriptionCreateParamsNonStreaming.__annotations__.keys() + ).union(set(TranscriptionCreateParamsStreaming.__annotations__.keys())) + return all_transcription_kwargs @staticmethod def _get_exclude_kwargs() -> Set[str]: