Merge pull request #9451 from hsaeed3/correct-transcription-params

fix(model_param_helper.py): update `_get_litellm_supported_transcription_kwargs()` to use proper annotations from `TranscriptionCreateParamsNonStreaming` & ``TranscriptionCreateParamsStreaming`
This commit is contained in:
Ishaan Jaff 2025-03-21 19:10:21 -07:00 • committed by GitHub
commit 478d209a0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.__annotations__.keys())
all_transcription_kwargs = set(
TranscriptionCreateParamsNonStreaming.__annotations__.keys()
).union(set(TranscriptionCreateParamsStreaming.__annotations__.keys()))
return all_transcription_kwargs
@staticmethod
def _get_exclude_kwargs() -> Set[str]: